Skip to content

How to Download a File or Directory via SSH


There may be times when you find it more efficient to download a file or directory via SSH rather than a SFTP GUI. Here’s how to do that:

To download a single file:

scp username@source_host:path/to/ ~/Desktop

To Download a directory (folder):

Use the -r option

scp -r username@source_host:path/to/source_folder ~/Desktop

If you’d like to change the destination location for either of these commands, simply replace /Desktop with the path of your desired destination.

Posted in ,

Daniel Lemky

As the founder of Quantum Fire Labs, Daniel has over a decade of web and IT experience. He has worked with clients across North America and has helped them build professional and effective online business solutions.