Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rubyのnet/sshを使用してターゲットネットワーク内のホストへの接続を確立しようとしています。私がbashを使用している場合、次のようになります。
ssh $gateway_host -t ssh $target_host
何か案は?
gw = Net::SSH::Gateway.new(gw_host, gw_user) gw.ssh(server_host, server_user) do |ssh| ssh.exec!("do_stuff") end