Just A Small Guideline

Feel free to browse the site. Don't be afraid to leave comments, they're supportive.
Please follow me on Twitter @ehldmnt and retweet my posts.

Sunday, May 19, 2013

How to transfer files and directories over an SSH connection.

This is a long unanswered question that I had actually scowered the inernet for, never realizing that the answer was staring at me in the man pages. This guide assumes that you have a LAN ssh connection, and doesn't explain how to achieve one over the internet First things first, introducing the scp command.
[SYNTAX]

scp [OPTIONS] [FILE] [DESTINATION]

To copy a single regular text file called "important.txt" from the user "bob" on the present computer "maxie" to the remove computer user "mark"'s documents on a computer named "sandbox":

 scp important.txt mark@sandbox:~/Documents

 The only downside to this is that you have to know the exact directories, but this guide assumes that you already know where they are.

To copy an entire directory, maybe the "water_pictures" directory from "mark" on "sandbox" to "bob" on "maxie":

scp -r water_pictures bob@maxie

This will recursively [explicitly] show you everything that is being transfered, but it'll get the job done.

1 comment:

Anonymous said...

I was excited to uncover this site. I want to to thank you for your time for this particularly wonderful read!
! I definitely really liked every little bit of
it and i also have you bookmarked to look at new things
on your site.

Feel free to surf to my website - Louis Vuitton Outlet Online