8000 Add automaticaly the port number when connecting to a host with a different ssh port · Issue #152 · ovh/the-bastion · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add automaticaly the port number when connecting to a host with a different ssh port #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
deepbluemussel opened this issue Feb 23, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@deepbluemussel
Copy link

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.

@speed47
Copy link
Collaborator
speed47 commented Feb 26, 2021

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?

@deepbluemussel
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
0