How To Securely Transfer Files Remote Server To Your Local Ubuntu

If you ever want to transfer a file from a remote server (especially one that you access with SSH) to your local machine, you simply open up Terminal and do the following commands:

scp username@192.168.1.1:/path/to/file /path/on/local/machine

  • You may be prompted for a password for the remote server.
  • Make sure you have permissions to write to the destination path.
  • Preppend the keyword sudo at the start if┬ánecessary.
  • You may need to do sudo apt-get install ssh if SSH is not installed.

This command also works the other way around (transferring from local to a server).


© 2012-2017