limit bandwidth on sftp

krad kraduk at
Tue Mar 16 09:13:50 UTC 2010

On 15 March 2010 13:34, Lowell Gilbert <
freebsd-questions-local at> wrote:

> Tsu-Fan Cheng <tfcheng at> writes:
> >    I need to limit my sftp session bandwidth to 20K, can someone show me
> how
> > to do it? thank you!
> There's no simple way to do that.
> scp has such a capability, though; maybe using that is your easiest option?
> --
> Lowell Gilbert, embedded/networking software engineer, Boston area
>      <>
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at"

You could limit port 22 with pf, ipfw etc. This would slow all you ssh
traffic rather than just sftp which may or may not work for you. If you are
clever with your rule sets you could guarantee bw for certain hosts so they
dont loose a functional ssh session and/or you could bw limit it by source
ip, rather than a global limit for port 22.

More information about the freebsd-questions mailing list