I read an article that SSH Daemon Service. But I want to run on Centos6.4. So I setup from official centos image with almost same istruction. Then I connect to centos sshd server, but connection is closed immediately. Here is the message.
ssh root@localhost -p 49164
The authenticity of host '[localhost]:49164 ([127.0.0.1]:49164)' can't be established.
RSA key fingerprint is 88:71:89:e5:30:91:78:5c:bf:cb:88:c2:5b:81:1a:b5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:49164' (RSA) to the list of known hosts.
root@localhost's password:
Connection to localhost closed.
Why I cannot connect centos sshd server?
OS requirementsTo install Docker Engine, you need a maintained version of CentOS 7, CentOS 8 (stream), or CentOS 9 (stream). Archived versions aren't supported or tested. The centos-extras repository must be enabled. This repository is enabled by default, but if you have disabled it, you need to re-enable it.
SSH software packages are included on CentOS by default.
Had the same issue here, works fine if you turn off PAM in the sshd config.
Here are the relevant lines from our Dockerfile
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With