-
Notifications
You must be signed in to change notification settings - Fork 89
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
ssh into container immediately closes the connection #11
Comments
does the sshd service need to be running on the container? |
Are you running Docker on Windows? If so check #7. |
Had a similar issue today and it turned out to be a typo and permissions on the /var/run/docker.sock and in your case it could be permissions too. Try changing the volume flag to: -v /var/run/docker.sock:/var/run/docker.sock:Z That should setup SELinux permissions correctly if that happens to be the issue. |
I have the same issue on ubuntu the client and on the server and logs return:
|
+1 Darwin mbp-user 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64 Docker version 1.13.0, build 49bf474 |
@mgomma i had the same issue, building the dockerfile in this git repository again resolved the issue Also i had to quote this with single quotes The full command
Note during the build i encountered the following warnings:
This works on Docker For Windows
|
hi all, I forget that to installed the "bash" into the objective container, eg. in alpine image, "apk add bash". |
i ran this command from the instance where docker resides:
sudo docker run -d -p 2222:22
-v /var/run/docker.sock:/var/run/docker.sock
-e CONTAINER=matt -e AUTH_MECHANISM=noAuth
jeroenpeeters/docker-ssh
i run the ssh command to the instance:
ssh -p 2222 -i <KEY_LOCATION> user@ipaddress
and get the following dialogue before it closes the connection immediately
###############################################################
Docker SSH ~ Because every container should be accessible
###############################################################
container | matt
###############################################################
Connection to XX.XXX.XX.XXX closed by remote host.
Connection to XX.XXX.XX.XXX closed.
The text was updated successfully, but these errors were encountered: