Copy files remotely using SCP in Ubuntu

  • Using SCP you could copy files remotely. Following is the general syntax.

scp  <file> <username>@<IP address or hostname>:<Destination>

  • Here are some examples.

Lets say user ‘me’ has to send the file with name test to the user ‘you’, while being in the me’s account.

scp test you@

  • The default destination is /home/you here. Unless you specify otherwise file will be copied on to the default location as in the example above. If you want to specify location, the following example will help you.

               scp test you@ 

Content Courtesy: