How to: Transfer files between servers over SSH in Ubuntu/Debian

created by BasicSysAdmin

Tags: Linux, Ubuntu, Ubuntu 14.04, Ubuntu 15.04, Debian, Debian 7

Jul 09, 2016

In this tutorial, I will be showing you how you can transfer files between servers. Below, you should be able to see this been done.

Download to this server

If you are currently connected to a server and would like to download a file to it from another server, you will need to run a command like this.
scp user@host:/path/to/remote/file /location/to/save/file

You should then be prompted to enter a password. Once you have done this, you should then see the file start to download.

Upload to another server

If you would like to upload a file from a server you are currently connected to over to another server, you can do so using the command below.
scp /path/to/my/file user@host:/location/to/save/file