net-ssh/net-scp

Unable to forward remote port to the local port using this gem in window environment

Closed this issue · 2 comments

I am trying to forward the remote(ec2) port to local port to watch the jobtracker in my local browser which is running on amazon ec2 cluster. But unable to forward the remote port. Please help!

Here is my code:

Net::SSH.start('ec2-23-23-4-229.compute-1.amazonaws.com' ,'hadoop' ,:keys => "mykeypair.pem",:forward_agent => true) do |ssh|
ssh.forward.remote(9033, "localhost",9101,"ec2-23-22-4-249.compute-1.amazonaws.com")
ssh.loop { !ssh.forward.active_remotes.include?([9033, "localhost"]) }
end

This isn't a support forum.

Use the openssh client.
https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding