Discussion:
[docker] ssh inside container
igorman mounir
2016-03-01 14:08:38 UTC
Permalink
Hey everyone,i v installed openssh-server in my container but when i try to
create an ssh tunnel ssh -N -L 27017:localhost:27017 ***@localhost i
receive this message : ssh: connect to host localhost port 22: Connection
refused even if ssh server is started in host,How can i deal with this
problem ?
Vasanth Sundaravelu
2016-03-01 17:20:23 UTC
Permalink
Hi, what is the base image used for your consider (Ubuntu?).. Do you have
iptables/firewall blocking the connection in the container?
igorman mounir
2016-03-01 17:30:08 UTC
Permalink
Hey Vasanth, it works inside the container but i can't connect to ssh
server '*Permission denied, please try again.' even if i'm *
*connecting with root*
Post by Vasanth Sundaravelu
Hi, what is the base image used for your consider (Ubuntu?).. Do you have
iptables/firewall blocking the connection in the container?
--
Mounir IGORMAN
Ingénieur Etudes & Développement
Phone : +212617612986
igorman mounir
2016-03-01 17:31:52 UTC
Permalink
Hey Vasanth, it works inside the container but i can't connect to ssh
server '*Permission denied, please try again.' even if i'm *
*connecting with root*
Post by Vasanth Sundaravelu
Hi, what is the base image used for your consider (Ubuntu?).. Do you have
iptables/firewall blocking the connection in the container?
Vasanth Sundaravelu
2016-03-01 18:44:31 UTC
Permalink
Mounir,
Sorry, I'm confused!!!
Can I ask - where do you execute the below command:
"ssh -N -L 27017:localhost:27017 ***@localhost"
igorman mounir
2016-03-02 11:26:17 UTC
Permalink
i run it inside my container !
Post by Vasanth Sundaravelu
Hi, what is the base image used for your consider (Ubuntu?).. Do you have
iptables/firewall blocking the connection in the container?
James Mills
2016-03-02 04:34:14 UTC
Permalink
Why don't you just:

docker exec <cid> /bin/bash

cheers
James


James Mills / prologic

E: ***@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Post by igorman mounir
Hey everyone,i v installed openssh-server in my container but when i try
receive this message : ssh: connect to host localhost port 22: Connection
refused even if ssh server is started in host,How can i deal with this
problem ?
Loading...