August 15th, 2013

dog knotwork

Copying files direct from one server to another server with Secure CoPy (SCP) and SSH shell access

I don't need to do this all that often, so it is quite irritating to me that I knew how to do this back in May, but I didn't quite finish the job for some reason, and then when I came back to it, I couldn't remember how I did it or find any notes about it. Grrr!

So, I figured out how to do it again. And now here I am making notes in public, where the world can Google it if they want to, and so can I.

I SSH'd into Server1, where I found the files I wanted stashed in this directory: /domains/t/h/

Then I checked Server2 to find out where I wanted to put the files. Ah yes, in /home/thiswebsite/public_html (different directory structure on Server2, just to make my life more exciting apparently).

So I did this:

scp -rp /domains/t/h/

Only then I found that user account, on did not have shell access. In a moment's foolishness, I switched to root access. But this doesn't work (fortunately) - you can't just scp right in when you are root. The thing to do was to change so that he had shell access. So I did that, and it worked. Hurray! A pile of monster files copied direct.

more helpful instructions here.