Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to move 5 gigs of files from one remote host onto another remote host, which does not make the scp command available via the console. So i'm contemplating any other options than first downloading the files to my local machine, only to reupload them to the final server.

The target server uses sftp. Would it be possible to launch an sftp "download" to the target server via the ssh console?

If so, what are the command schemes?

share|improve this question
    
Please validate this: you want to move files on boxA to boxB, but you have to do that from boxC, correct? I assume you can login via ssh to any of the boxes, yes? –  jim mcnamara Dec 24 '12 at 22:39
    
yes to all. Problem is: boxC has very little commands available for remote transfer. no scp at least. So i'm looking at alternative options. –  pixeline Dec 25 '12 at 19:39
    
Good. Last question: Are ssh-keys installed on all three boxes? If yes it will make the mish-mash of an all ssh|tar transfer simpler. –  jim mcnamara Dec 26 '12 at 1:28
    
have no idea. i'm sorry i'm just learning as i go here with ssh. I remember have to accept keys on first sftp connection, which worked. maybe you can elaborate on the ssh|tar transfer method? I'll test that and report. –  pixeline Dec 26 '12 at 20:39
add comment

2 Answers

ssh keys mean that as some user, say pixeline, when you are logged on to serverC, when you type

ssh serverA

It connects you directly with asking for a password.

IF there are keys then this should work for you

#copy from serverA to serverB from serverC - you are logged to serverC
   ssh pixeline@serverA  'cat /path/to/filename | ssh pixeline@serverB "cat > /path/to/remotefilename " '

It will not work well without ssh public keys - this is a step by step how to: http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html

NOTE: your home directory has to have protections 755 at least and the .ssh directory under home should be 700. On all 3 servers.

Have fun... You MUST get that working, and if you want to do all the files at one time we can try tar.

share|improve this answer
add comment

If all the servers are linux or unix based you might be able to use rsync as it would be the fastest way to complete it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.