Here's the setup:
I have server A, which is running my ruby scripts and servers B & C. I need to be able to transfer files from B to C.
I've experimented with using Net:SCP, but I haven't found a way to set up a transfer between the two remote servers. The best I've been able to do was go from B to A and then from A to C.
Based on some example code I've seen elsewhere, I'm trying to ssh onto B and call scp from that server:
Net::SSH.start(host, user, :password => pword) do |ssh|
ssh.exec! "scp /filename user@serverC:/filename" do |channel, stream, data|
channel.send_data "#{pword}\n"
end
end
This is not working for me. Is this even possible?