-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
This commit provides support for connecting to the destination host via an SSH gateway. - connector_port_open? implementation for winrm and ssh - the ssh implementation checks if it can connect to the gateway if the gateway is given. If it is not given then connect directly to the destination. - host_commander#connector_for now calls the connector_port_open? for winrm and then ssh. - port_open? moved to host_connector so it could be called from the winrm and ssh host connectors. - ssh connector's run method now creates a gateway connection if the gateway value is in the :ssh options.
|
||
if options[:ssh][:gateway] | ||
gw_host, gw_user = options[:ssh][:gateway].split("@").reverse | ||
gw_host, gw_port = gw_host.split(":") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm okay with the format of user@host:port
, but its a bit different than what might be expected. I think it might be worth having some error checking here to make sure the variables are split appropriately.
Would you rather the config be something like
I picked the format user@host:port because it is the format that knife ssh uses. We can add some error checking but because of the possible characters allowed in a user and host name it may not be 100% correct. |
@KAllan357, any thoughts on my previous comment? |
I personally like the user@host:port better because it conforms to the knife ssh style. Any other thoughts? |
Whoops, should have added @KAllan357 and @rteabeault since they're the most familiar. |
@KAllan357 @reset @ivey This seems reasonable to me. We've unfortunately let this PR languish. I will spend some time tomorrow to see if this can be rebased easily. Any thoughts on why this might not be ready for merge pending a rebase? |
Rebased on master in #26 |
Closing this one in favor of #26 (same commit, rebased) |
Looking for feedback...
This commit provides support for connecting to the destination host via an SSH gateway.
it is not given then connect directly to the destination.