capistrano/sshkit

Example for gateway/tunneling/proxy ?

grosser opened this issue · 5 comments

I'm using raw sshkit, and can't find any docs on how to do any of these, lots of issues around them but never a working example ... and the docs on the topic also don't give any examples https://github.com/capistrano/sshkit#tunneling-and-other-related-ssh-themes

/cc @leehambley @msimonin since you were in some of the discussions around this issue

@jonmoter found a way:

host = SSHKit::Host.new(
  hostname: 'target.host.com',
  ssh_options: { proxy: Net::SSH::Proxy::Jump.new("proxy.bar.com") }
)
on [host] do
  execute :echo, '1'
end
tisba commented

Uh, that's actually very useful, thank you @grosser! I solved my jump host problem in another way, but having a small section in the README would be nice.

@grosser Would you be willing to provide a PR to add the example to the Capistrano documentation?

I'll take a look