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