How to SSH into docker container from Windows host under coreos-vagrant?

41 views
Skip to first unread message

Lantos István

unread,
Jul 1, 2015, 10:05:18 AM7/1/15
to vagra...@googlegroups.com
I exposed docker tcp port 2375 to the public.

When I type this URL: http://172.17.8.101:2375/
I've got this message in the browser: "404 page not found"

When I type this URLs, error 404: http://172.17.8.101:8080/, http://172.17.8.101:8081/

I start my Debian container with this command:

    $ docker run --name lanti-debian --rm -i -t -v /home/core/share:/root/share -p 8080:80 -p 8081:22 lanti/debian bash

In a new windows command line, I try to SSH in:

    $ ssh ro...@172.17.8.101 -p 8081

Which I've got the following error message:

    $ ssh: connect to host 172.17.8.101 port 8081: Connection refused

If I try to use the following command, I've got the password prompt field, but this is probably wants to SSH in the CoreOS host:

    $ ssh ro...@172.17.8.101 -p 22

My question is: How I can SSH into a Debian docker container under CoreOS from the Windows host? It would be very neat, if it's possible.

Thank You for your help!

István

Lantos István

unread,
Jul 1, 2015, 12:35:38 PM7/1/15
to vagra...@googlegroups.com
Now this is what I got in my Windows CMD:


    $ ssh ro...@172.17.8.101 -p 8081
    ro...@172.17.8.101's password:
    Permission denied, please try again.

Lantos István

unread,
Jul 1, 2015, 4:08:02 PM7/1/15
to vagra...@googlegroups.com
Solved: Looks like I needed to copy to windows host the id_rsa file also, not just the id_rsa.pub. Now I can SSH into docker container from windows host.
Reply all
Reply to author
Forward
0 new messages