How to use scp to transfer files to your server

If you need to transfer files from one Linux server to another and are working from the command line. You can use the following scp command to achieve your task.

If the remote server is using the standard SSH port than you can remove the -P 245 part. If the remote server is using a custom port for SSH connections than you can change the value 245 to match the appropriate port number on the remote server. You will need to replace the 111.111.111.111 example with the remove servers actual IP address.
scp -P 245 /home/jeff/file.tar.gz sshuser@111.111.111.111:/home/dest