LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   enforce a bandwidth limit for scp per user (https://www.linuxquestions.org/questions/linux-networking-3/enforce-a-bandwidth-limit-for-scp-per-user-652368/)

lothario 06-29-2008 03:38 AM

enforce a bandwidth limit for scp per user
 
When using scp to transfer files, I can use the "-l" option to limit the bandwidth of the file transfer.

Now I have a ssh/scp server running.
I want to enforce a bandwidth limit for scp per user.

How should I do this?

stress_junkie 06-29-2008 02:00 PM

You could make a command alias.
Code:

alias scp="scp -l 100"
Different distributions handle this in different ways. My PCLOS system has a script /etc/profile.d/alias.sh which contains commands that are executed when anyone logs in. Aliases are defined like that. Other methods used on UNIX and Linux systems include putting log in commands in /etc/bash.local or in each person's $HOME/.bashrc or $HOME/.alias.


All times are GMT -5. The time now is 12:54 AM.