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

Support reading from .ssh/config #113

Open
chrmarti opened this issue Nov 7, 2019 · 5 comments
Open

Support reading from .ssh/config #113

chrmarti opened this issue Nov 7, 2019 · 5 comments

Comments

@chrmarti
Copy link

chrmarti commented Nov 7, 2019

With the support for ssh:// for the Docker host in, it would be great if .ssh/config would be supported like the Docker CLI does too. There is the ssh2-config NPM package helping with that.

@phuctm97
Copy link

phuctm97 commented Mar 6, 2020

Was this resolved?

@chrmarti
Copy link
Author

chrmarti commented Mar 6, 2020

Not that I know.

@karolz-ms
Copy link

I would love to see this fixed too. Here are more detailed repro steps--hope this helps

  1. Configure an SSH host with a non-DNS-resolvable name (Host field in./ssh/config, e.g. mydevbox) that maps to real machine name or IP address (HostName field, e.g. mydevbox.real.dns.name). See http://man7.org/linux/man-pages/man5/ssh_config.5.html for details. The following steps assume Docker is installed on mydevbox machine.
  2. Set up SSH public key authentication to mydevbox (see https://www.ssh.com/ssh/agent for details)
  3. Verify SSH connection to mydevbox works (ssh mydevbox should suffice)
  4. Set DOCKER_HOST to ssh://mydevbox. Verify Docker CLI works and shows Docker assets on mydevbox (docker ps, docker images etc).
  5. Try to open a connection to Docker using docker-modem

Expected: it should work, just like the Docker CLI
Actual: it does not work. This is because docker-modem implementation requires the host to be fully resolvable through DNS. Even placing an entry in /etc/hosts does not help

Using non-DNS-resolvable name comes handy in several situations, for example:

  • The machine running Docker is an ephemeral machine with no public DNS entry
  • The host nickname is used as a way to indicate what user identity to use when connecting to the host

@phuctm97
Copy link

@karolz-ms I had same issues, too. Therefore, I'm going to create a PR fixing this, however it's just going to happen in at least two more weeks.

@karolz-ms
Copy link

@phuctm97 that would be awesome, let me know if I can be of help!

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

3 participants