Forum: Ruby Multiple SCP from remote machine

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a8dbc2f1bba94e8ca556613f263c155?d=identicon&s=25 beth (Guest)
on 2006-03-21 01: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 ./sample.sh " ) --(which uses a simple shell script to
execute the above described commands)

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

Can anyone help?

Thanks in advance,

Beth
Ab6d0485042a44803b00ffdf878ae5b6?d=identicon&s=25 unknown (Guest)
on 2006-03-21 02:13
(Received via mailing list)
ssh -t host1 scp host2:/path /localpath

should work just fine.

--Matt
This topic is locked and can not be replied to.