scp is the command to perform file transfer using SSH. To transfer a local file to a remote host, use the following command:
scp localfile username@remotehost:destpath
|
In this command localfile is the path to the local file. username is the user name on the remote host for authentication purposes. remotehost specifies the remote host. destpath is the path of the destination. If the destination is folder, then the new file has the same name as localfile. If the destination is a file, then the file is renamed to the specified name.
To remotely copy a file to a local file system, just reverse the order of the two arguments to scp.