解决ssh登陆到docker容器自动退出的问题

in docker with 0 comment
bash-4.3# ssh root@192.168.1.54
root@192.168.1.54's password:
Last login: Tue Jul  5 06:51:12 2016 from 192.168.1.46
Connection to 192.168.1.54 closed.
bash-4.3# 

// 登陆后自动退出容器.

//解决登陆后自动退出容器

080836fadc3a ~# vim /etc/ssh/sshd_config
PermitRootLogin yes
UsePAM no
080836fadc3a ~# /etc/init.d/sshd restart

//再次登陆容器

bash-4.3# ssh root@192.168.1.54
080836fadc3a ~#
Responses