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@ /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-2023