Sometimes I need to pull files from one server to another so I need to use secure copy. This is really simple to do with SSH, but I always seem to forget the command when I need it. SSH allows Unix users to secure their terminal and file transfer connections. Now let’s look at the code:
Once you are where you want to be, the command is:
scp filename.ext firstname.lastname@example.org:
First type in scp (the secure copy command), then the filename, followed by your username on the other server, the @ sign, and the IP or host name of the other server. The part I always forget is the colon (:) and you need this or it will not work. Once you’ve executed this, you will be prompted for your password on the other server. Once verified things should transfer to your user directory on the other server.
If you need to copy an entire directory be sure to include the -r and you’re set
scp -r directory email@example.com:
Hopefully this helps someone else out! Do you have any basic commands that you always forget?