1, the container must first run a sshd port
2, into the container, the installation sshd
ocker exec -it httpd /bin/bash
After entering the container operations
yum -y install openssh-server openssh-clients
rpm -aq|grep openssh
3, start sshd
/usr/sbin/sshd -D &
passwd root #ssh连接时有的密码
4, try to connect
docker inspect httpd
ssh 172.17.0.2
success