No SSH to Docker container

Locked
mmeewezen
New here
Posts: 7
Joined: Tue Apr 27, 2010 7:42 pm

No SSH to Docker container

Post by mmeewezen »

Hi guys,

I enabled an ssh server on port 22 and mapped it to the host on 2222 using the advanced config options.

But i cannot connect to it from a client on the same network as the host (=qnap) using

Code: Select all

ssh -p 2222 <qnap ip-address>
Port 80 port-mapping works just fine.

Your input would be appreciated.
mmeewezen
New here
Posts: 7
Joined: Tue Apr 27, 2010 7:42 pm

Re: No SSH to Docker container

Post by mmeewezen »

Thanks for your reply.

I can access the container with ssh from my qnap terminal.

The qnap seems to be listening on port 2222

Code: Select all

tcp        0      0 0.0.0.0:2222            0.0.0.0:*               LISTEN
I rebooted the container and now it does function, but I have not changed it's config, wierd.
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: No SSH to Docker container

Post by oyvindo »

I'm not sure I understand what you're trying to do, but if you're trying to SSH into a container, don't map any ports. Just SSH into your QNAP QTS, and from there, type:

Code: Select all

docker exec -t -a <container-ID> bash
ImageImageImage
User avatar
OneCD
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: No SSH to Docker container

Post by OneCD »

Viking, I think you're a little-late on this one. It's been 5 years since this was asked. :DD

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: No SSH to Docker container

Post by oyvindo »

OneCD wrote: Wed Apr 21, 2021 3:26 am Viking, I think you're a little-late on this one. It's been 5 years since this was asked. :DD
Ha, ha - you're right! I am embarrassed 😶
ImageImageImage
Locked

Return to “Container Station”