Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Support ssh gateway #12

Open
rteabeault opened this issue Mar 5, 2014 · 1 comment
Open

Support ssh gateway #12

rteabeault opened this issue Mar 5, 2014 · 1 comment

Comments

@rteabeault
Copy link
Contributor

For us we have a CI pipeline that deploys to production. We have jenkins slaves which ssh to the production through a bastion host. Our current deployment code (non-chef) uses Net::SSH::Gateway to accomplish this. knife ssh has a -G flag for using an ssh gateway. It would be great if ridley-connectors also supported this. I would love to get this added and then add support to motherbrain.

Here is how knife parses the gateway param user@some_host:1234

if config[:ssh_gateway]
  gw_host, gw_user = config[:ssh_gateway].split('@').reverse
  gw_host, gw_port = gw_host.split(':')
  gw_opts = gw_port ? { :port => gw_port } : {}

  session.via(gw_host, gw_user || config[:ssh_user], gw_opts)
end
@rteabeault
Copy link
Contributor Author

I got the gateway connections working. I am now trying to figure out the best way to deal with

https://github.com/RiotGames/ridley-connectors/blob/master/lib/ridley-connectors/host_commander.rb#L172-L187

You can't do the Celluloid::IO::TCPSocket through to the gateway or at least I don't think you can.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant