My problem is almost exactly the same as the following link, except my ssh server is in a docker container.
My Dockerfile is very simple.
FROM ubuntu:12.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y openssh-server less nano
RUN mkdir /var/run/sshd
RUN adduser chrome
RUN echo "chrome:chrome" | chpasswd
RUN echo "root:chrome" | chpasswd
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
When I try to ssh login, it hangs forever starting the shell.
$ ssh -p2222 chrome@localhost /bin/bash --noprofile --norc # trying to login with ssh
chrome@localhost's password: <-------------hangs forever
I can login if I use the -t
argument on ssh. I don't know why.
Running other programs like ls
works without problems. Perhaps someone can replicate this container and figure out what the problem is?