Copy files/folders over ssh

Sometimes you just want to copy files from a remote server, and you want it often and quick. Stuff like a DB dump.
You could startup your (s)ftp client and browse to it. Or you could just grap it with ssh.

Download one file

scp -user@hostname.com:/full/path/to/dump.xml /local/path/to/Downloads

Download a whole folder

scp -r user@hostname.com:/full/path/to/folder /local/path/to/Downloads

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.