Add automaticaly the port number when connecting to a host with a different ssh port · Issue #152 · ovh/the-bastion · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When connecting to a host with a different standard port, you have to specify the port number.
It would be more convenient if the port is added to the ssh command depending on the server you want to connect to.
The text was updated successfully, but these errors were encountered:
Currently the way it works, is the user asks to connect somewhere, the bastion checks whether this is allowed or not, and takes decision based upon this. This behavior has to stay by default, because that's also how SSH works (if you don't specify a port, it always defaults to 22). However we could imagine a cmdline switch that, in the absence of an explicitly specified port, would try to find a matching allowed server with a non-22 port. This cmdline switch could be added, by the users, directly in their bastion alias if they'd like to use this behavior all the time. I didn't check yet whether this would be easy to implement or not, but would something like that work for you?
This is exactly the kind of solution I had in mind. At each ssh connection attempt, the command would list the available connections and automatically add the associated port.
Right now I'm using aliases to add the non-standard port and only a couple of instances uses port 22 so that's not a blocking issue, just to add more convenience.
When connecting to a host with a different standard port, you have to specify the port number.
It would be more convenient if the port is added to the ssh command depending on the server you want to connect to.
The text was updated successfully, but these errors were encountered: