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

Wrong SSH port getting used #43

Closed
treydock opened this issue Mar 11, 2021 · 0 comments · Fixed by #44
Closed

Wrong SSH port getting used #43

treydock opened this issue Mar 11, 2021 · 0 comments · Fixed by #44

Comments

@treydock
Copy link
Contributor

On Mac OS X Docker I am now running into issues I think were introduced here: 50912bf. This is some of output I see, notice how the port trying to be used is port 22 and not the actual mapped docker port:

/containers/create
{"name"=>"clustershell-el7"}
{"Image":"0c316f4c56e8","Hostname":"centos-7","HostConfig":{"PortBindings":{"22/tcp":[{"HostPort":"5484","HostIp":"0.0.0.0"}]},"PublishAllPorts":true,"RestartPolicy":{"Name":"always"},"Privileged":true},"Env":["LANG=en_US.UTF-8","LANGUAGE=en_US.UTF-8","LC_ALL=en_US.UTF-8"]}

...

  Attempting ssh connection to 172.17.0.7, user: root, opts: {:password=>"root", :port=>"22", :forward_agent=>false, :auth_methods=>["password", "publickey", "hostbased", "keyboard-interactive"]}
  Warning: Try 1 -- Host 172.17.0.7 unreachable: Errno::ECONNREFUSED - Connection refused - connect(2) for 172.17.0.7:22
  Warning: Trying again in 3 seconds

If I downgrade to 0.7.x the issue goes away so clearly the behavior of how to find the host port changed and no longer works with all versions of Docker.

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

Successfully merging a pull request may close this issue.

1 participant