Ssh tunnel using Net::SSH

using putty i connect to with myuser and mypwd
when i am connected then i perform this:
and i supplied mypwd
then i am finally ssh connected to

I am trying to do the same using Net::SSH using the proxy command but i
get always this message:

require ‘net/ssh’
require ‘net/ssh/proxy/command’

proxy =‘ssh -W %h:%p’)

Net::SSH.start(', ‘myuser’, :password=>“mypwd”, :proxy =>
proxy) do |my_ssh|
my_ssh.open_channel do |channel|

and i get this message:
`rescue in open’: No such file or directory - ssh -W

any idea how to do it?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs