LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2007, 10:42 PM   #1
utahnix
Member
 
Registered: Dec 2006
Location: Utah, USA
Distribution: openSUSE
Posts: 72

Rep: Reputation: 15
How to control/throttle scp transfers


Hello all,

I'm wondering if there is a way to throttle incoming scp transfers. I'm having bandwidth contention problems and would like to limit the total bandwidth per transfer, or connection.

I'm kinda doubting this can be done via opensshd (I can't find docs about this, anyway). I thought that perhaps iptables could do this, but am unsure how I would go about it.

I also thought about 'tc' command, but I really don't know how to use it, and as I understand it, it would affect the entire net interface, which isn't what I want.

Thoughts?

Last edited by utahnix; 11-26-2007 at 10:54 PM.
 
Old 12-01-2007, 05:56 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Bandwidth shaping *does* affect the whole interface but you can filter traffic so shaping only penalises whatever matches the filter. There's two "problems" though: 0) you can't affect inbound traffic directly only through shaping outbound traffic (AFAIK) and 1) SCP basically is the SSH protocol so that will affect everything on port TCP/22. (I vaguely remember there's a library you can LD_PRELOAD which should make apps behave somewhat like a modern version of "wget" does but I can't remember the name or location.) Searching LQ should show a lot of threads on bandwidth shaping. Else check out the Linux advanced Routing & Traffic Control (LARTC) HOWTO which has examples as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
how do you throttle bandwidth? wincen Linux - Networking 1 05-15-2005 12:58 PM
FTP bandwidth throttle lapthorn Linux - Networking 0 05-18-2004 06:40 AM
Full throttle cpu? corbintechboy Mandriva 1 10-03-2003 08:28 AM
How To throttle Pop3?? Andrea Linux - Networking 3 07-21-2001 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration