SCP FUNCTION
Ever find yourself connected via SSH to a remote host and quickly want to transfer a file? Some of you might connect via ftp and transfer the file that way, but why? Why not use the scp function? SCP or "secure copy" will transfer files to and from your host, or remote host - whichever direction you wish to send the file. It`s really quite easy.
Send from remote host, to your localhost
In your local terminal type the following:
Code: Select all
scp user@remotehost.tld:/directory/to/file.extension /path/to/store/file/locally
Send from localhost, to remote host
In the terminal type the following:
Code: Select all
scp /local/path/to/file.ext username@hostname.tld:/path/to/folder/on/remote/host
Of course, this is not all you can do with the command, it`s but a small introduction. You can ready the manual pages by typing man scp and learn some of the more advanced features.