Tuesday, November 25, 2014

SCP command

Basic syntax of SCP
# scp source_file_name username@destination_host:destination_folder
 

Provide the detail information of SCP process using -v parameter

# scp -v Label.pdf mrarianto@202.x.x.x:.
 

Provide modification times, access times, and modes from original files

# scp -p Label.pdf mrarianto@202.x.x.x:.

Make file transfer faster using -C parameter

# scp -pv messages.log mrarianto@202.x.x.x:.
 
# scp -Cpv messages.log mrarianto@202.x.x.x:.
 

Select another cipher to encrypt files

# scp -c 3des Label.pdf mrarianto@202.x.x.x:.
 

Limiting bandwidth usage

# scp -l 400 Label.pdf mrarianto@202.x.x.x:.
 

 Specify specific port to use with SCP

scp -P 2249 Label.pdf mrarianto@202.x.x.x:.
 

Copy files inside directory recursively

 scp -r documents mrarianto@202.x.x.x:.
 

Disable progress meter and warning / diagnostic message

scp -q Label.pdf mrarianto@202.x.x.x:.
 

Copy files using SCP through Proxy

ProxyCommand /usr/bin/corkscrew 10.0.96.6 8080 %h %p ~/.ssh/proxyauth
 
~/.ssh/proxyauth
myusername:mypassword
 

Select different ssh_config file

scp -F /home/pungki/proxy_ssh_config Label.pdf