scp — stdin stdout - file -- opt --help --version
scp local_spec remote_spec
The scp
(secure copy)
command copies files and directories from one computer to another in
batch. (For an interactive user interface, see sftp
.) It encrypts all communication
between the two machines. As a simple example, scp
can copy a local file to a remote
machine:
$ scp myfile remote.example.com:newfile
recursively copy a directory to a remote machine:
$ scp -r mydir remote.example.com:
copy a remote file to your local machine:
$ scp remote.example.com:myfile .
or recursively copy a remote directory to your local machine:
$ scp -r remote.example.com:mydir .
To specify an alternate username on the remote system, use the
username
@host
syntax:
$ scp myfile [email protected]:
18.223.160.61