SCP
Jump to navigation
Jump to search
Contents
About
Secure Copy Protocol (SCP) is used to copy files between two hosts.
Command
Copy file from remote host to local host.
scp [user]@[host]:[path] [path]
Copy file from local host to remote host.
scp [path] [user]@[host]:[path]
Copy file from remote host to remote host.
scp [user]@[host]:[path] [user]@<host>:<path>
Example
Running the command (remote to local).
scp user@123.46.67.89:/file/to/copy.txt /path/to/save.txt
Running the command (local to remote).
scp /file/to/copy.txt user@123.46.67.89:/path/to/save.txt
Running the command (remote to remote).
scp user@123.46.67.89:/file/to/copy.txt user@987.65.43.21:/path/to/save.txt