Skip to content

linux commands


scp

Remote to local:

scp username@from_host_ip:file.txt /local/directory/
scp -r username@from_host_ip:/remote/directory/  /local/directory/

Local to remote:

scp file.txt username@to_host_ip:/remote/directory/
scp -r /local/directory/ username@to_host_ip:/remote/directory/

Remote to remote:

scp username@from_host_ip:/remote/directory/file.txt username@to_host_ip:/remote/directory/