In this post, we will see how to resolve How to permit SSH connexion to a docker container with complete prompt?
Question:
I try to deploy debian containers to allow users to connect to them over SSH (for students for exemple).I managed to do this but when I am connected to the container I have a pseudo-TTY and it’s not the expected result I want. I want to have a complete interactive shell like when we connect to a reel server or machine.
I tried several ideas like :
change the docker add options in my
docker run
commands like :docker run -d -it CONAINER_ID
change the
sshd_config
in the debian container to allow TTYchange my dockerfile many times
add
ssh
options when I connect :ssh -t
orssh -tt
But any of theses ideas seems to help me. I show you my current Dockerfile it can be helpfull.
Best Answer:
I solved this problem with adding just one option in my Dockerfile when I create the user :If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review