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.
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