SCP over SSH
Long time lurker, first time poster, figured I would post a success story! \o/
So I had just finished configuring my new debian sever and it was time to transfer files from the old worn out Ubuntu LAMP server. Well I haven't played around much with the command line network file transfers so I decided to give SCP a go.
I was at work, so I ssh'd into my new server,I then ssh into my old server and attempted to scp the files back to my new server. NO DICE...it kept making a new directory on the same local machine. All the guides I had read (before coming here and reading a few posts) made no mention of scp is meant to be used WITHOUT having to connect via ssh first. So...that knowledge in hand I clean up the mess of files I just created, exit ssh and do scp for real this time.
Working command from my home server (not the remote one) as follows...
scp -r root@THEremoteSERVERipaddress:/where-the-files-are/on-the-old-machine /dir where/i-want-stuff-to-go-on-my-new-server
(the -r modifier is used to copy entire directories)
Hope this helps someone someday!
|