Skip to content
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

Take global ssh_config file into account and autocomplete host names #395

Open
pielonet opened this issue May 12, 2023 · 2 comments
Open

Comments

@pielonet
Copy link

pielonet commented May 12, 2023

Hi,

When creating a server for egress you presently do not specify a port, nor a user, nor any specific SSH options for this connection.

Dealing with specific hosts configurations is where ssh_config file is good at. It is aimed at it. It particularly allows to create aliases for hosts so that users do not have to remember servers FQDN to connect to.

Here is an example ssh_config entry that we would like The Bastion to take into account 👍🏽

Host myhostalias
  User myuser
  Port xxxx
  Hostname myserver.example.com

Or even better with wildcards :

Host myhostalias-w*
  User myuser
  Port xxxx
  Hostname %h.example.com

What more it would be useful to autocomplete host names (based on host aliases) like the ssh command usually does when trying to ssh to a server. This way users wouldn't have to remember specific domains. In case you address thousands of servers (like we do) it would just make it possible to use The Bastion.

The fact that The Bastion presently does not take this sort of specific configuration files into account is what prevents us from implementing this solution.

This issue is more or less linked to this one #152 opened two years ago.

@maxatome
Copy link
Member

Hi, doesn't #384 fulfill your needs?

@pielonet
Copy link
Author

pielonet commented Jun 5, 2023

Hi,

Yes this contrib #384 fixed my issue. Thanks.

I wrote following configuration style:

Host myhostalias
	Hostname bastion.example.com
	RequestTTY yes
	RemoteCommand -p xxxx [email protected]
	User myuser
	Port  xxxx

It can be closed.

Kind regards,
Thierry

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

No branches or pull requests

2 participants