Using SSH

I periodically have to use SSH to connect to some remote servers I work with. I'm writing this post just as a way to document some common ways I send files back and fourth.

First to login over SSH you use the following:


To copy I normally use the scp unix command. You can learn more on that here.

upload from local to remote

To copy files from your local machine to a remote server you've SSHd into do the following:

scp -r <local_directory_to_upload> <username>@<ip_address_or_hostname>:<remote_folder>

download from remote to local

To copy files from your remote server to your local machine do the following:

scp -r <username>@<ip_address_or_hostname>:<remote_folder> <local_directory_to_download>

Cover image was originally copied from here