Forum: Ruby Multiple SCP from remote machine

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
beth (Guest)
on 2006-03-21 02:13
(Received via mailing list)
I'm a nuby who needs help solving a problem trying to copy from
multiple remote servers

I need to ssh into a remote machine (Machine X).  Once in Machine X  I
need to SCP a file from machine Y. I'm not sure how to do this as it
seems that the process hangs while waiting for the first ssh to exit.
I've tried:

system("bash ./ " ) --(which uses a simple shell script to
execute the above described commands)

I've also tried `ssh user@ `-- which hangs untill an exti is

Can anyone help?

Thanks in advance,

unknown (Guest)
on 2006-03-21 03:13
(Received via mailing list)
ssh -t host1 scp host2:/path /localpath

should work just fine.

This topic is locked and can not be replied to.