How to download a file from the server

To download a file we can use a few ways. We will use SSH for this purpose.

  1. SCP command

SCP (secure copy) is a command-line utility that allows you to securely copy files and directories between two locations.

scp your_username@remotehost:/remote/dir/foobar.txt /local/dir
  1. RSYNC command

Rsync copies files either to or from a remote host, or locally on the current host (it does not support copying files between two remote hosts).

rsync ~/foo/bar.txt your_username@remotehost:~/foo/bar

Leave a Reply

Your email address will not be published. Required fields are marked *