scp with linux



2016-06-28 22:45:55gstlouis

Basic syntax of SCP

scp source_file_name username@destination_host:destination_folder

The “-p” parameter will help you on this. An estimated time and the connection speed will appear on the screen.

pungki@mint ~/Documents $ scp -p Label.pdf mrarianto@202.x.x.x:.

Limiting bandwidth usage

Another parameter that may useful is “-l” parameter. The “-l” parameter will limit the bandwidth to use. It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the SCP process.

pungki@mint ~/Documents $ scp -l 400 Label.pdf mrarianto@202.x.x.x:.

2016-06-28 22:48:22

Use the tool sshpass

sshpass -p 'password' scp file.tar.gz

Rather than using root create an account just for this job. Use public keys without a passphrase instead of passwords.

scp -i /home/backupuser/.ssh/id_rsa

By using a special account for the backup on the destination system you are not exposing your root password.

2016-06-29 17:03:38