ssh连接到docker¶
1.更新apt源,安装ssh
apt-get update && apt-get install -y openssh-server
vim /etc/ssh/sshd_config
PermitRootLogin prohibit-password
改成PermitRootLogin yes
3.创建docker中root用户的密码用于登录
passwd root
service ssh restart
1.更新apt源,安装ssh
apt-get update && apt-get install -y openssh-server
vim /etc/ssh/sshd_config
PermitRootLogin prohibit-password
改成PermitRootLogin yes
3.创建docker中root用户的密码用于登录
passwd root
service ssh restart