Dreams of Thought

Are dreams thoughts… or are thoughts dreams..

RSS Feed

Monthly Archives: July 2009

Copying files from one unix box to another with scp

7 Comments

ssh is a very powerful and widely used protocol in all the Unices. If you’ve used the ssh client in your Unix/Linux box, you must have realised how indispensable it is. There is another indispensable tool that uses the ssh protocol – scp (secure copy). scp was meant to be an alternative to unsecure tools like rcp. It has since replaced most such programs. Since scp uses the ssh protocol, the encryption it uses ensures security of your data.

Using scp is simple. It works almost like the regular cp command. The basic syntax is
scp SOURCE DESTINATION
In order to specify the SOURCE or DESTINATION we have a special syntax.
USERNAME@HOST:PATH

Let me give you an example :
$scp anirudh@box:/var/www/html/test.html gingerjoos@linux:~/test_dir/
Copy /var/www/html/test.html in the machine called “box” as user “anirudh” to the box called “linux” as user “gingerjoos” to the path HOMEDIR/test_dir/

That’s it :) Simple, right?

To copy the file to our localmachine, we could do this
$scp anirudh@box:/var/www/html/test.html ~/workarea/

This would copy the file test.html in the machine called “box” (as user anirudh) to the localmachine at path HOMEDIR/work_area/

Interchange the source-destination to copy file in your localmachine to the remote machine.

If you want to copy whole directories, use the ‘-r’ flag(recursive copy)
$scp -r ~/workarea/ anirudh@box:~/workdir/

Since scp is tied to the ssh program, the keys you use to set up passwordless login with ssh works for scp as well.

Got questions? Got something to add to this? Post your comments below :)

Filed under Linux, technology
Jul 31, 2009

I can has membership in bunny association

0 Comments

Dear Chairbunny,

I is very sick. Very very sick. I is coughing all the time. I is see the doc and doc says I get all right in 3 days. Until then pleash make me temporary member of bunny association. I is attaching fotografic proof for ur considerashon.


I is sick in bed asking others if they too be sick.

So I is decide to see doc. Doc treating me.

Met new friend in hospital. Is name piglet.

I is very sick indeed.

I think of me mum then. I here see dream about her giving me soup. Is tasty, yes. yummm yumm..

Pleash consider above fotografic proofs and approve membership. I is promise I be ok again very soon and then I go back from bunny association and I be like this then.

I assure of this.

Thanking you.

Yours faithully,
whatsmyname

 

 

 

I created this “letter” to amuse a friend while my health wasn’t great. She enjoyed it, so maybe someone out there will too :)

Acknowledgments :
The pictures are linked from
http://rlv.zcache.com/bunny_in_bed_you_sick_card-p137874246511222806qnyj_400.jpg
http://z.hubpages.com/u/425811_f260.jpg
http://funzro.files.wordpress.com/2009/05/stormtroopers-healing-sick-bunny.jpg
http://4.bp.blogspot.com/_as3Nej49UTU/RhpTvLyTJWI/AAAAAAAAAHo/tK1dFvH8czw/s400/sick-green.jpg
http://3.bp.blogspot.com/_Bdo46FhNcPc/Sa1dDQsOwRI/AAAAAAAABJ8/M2r9xrEL214/s400/sick+bunny.jpg
http://mellowdrone.com/blog/wp-content/uploads/2009/05/happy-elephant-01.jpg
Thank you guys for the pics.
Thanks also to Google Image search for helping me find these. You guys are the best.
Thank you, reader :)

Filed under story
Jul 26, 2009