0

So im trying to forward a port in an already forwarded session. here's the code:

require 'net/ssh'


Net::SSH.start(
  '1.2.3.4', 'username',
  :host_key => "ssh-rsa",
  :keys => [ "/Users/awesomesauce/.ssh/coolness.pem" ],
) do |session|
  session.forward.remote(8080, "localhost", 8081)
  # Heres where I want to forward over the 'session'
  # session.forward.remote(8081, "some.other.host", 80)
  session.loop { true }
end

Any ideas?

Nicholas Terry
  • 1,812
  • 24
  • 40

0 Answers0