To download a file we can use a few ways. We will use SSH for this purpose.
- 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
- 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