本机机器ssh docker容器

https://blog.csdn.net/u010324465/article/details/77184506

1、在docker中安装openssh-server

2、sudo /etc/init.d/ssh start 启动服务

3、查看启动成功与否 ps -e|grep ssh

4、$sudo vim/etc/ssh/sshd_config

PermitRootLogin without-password 改为 PermitRootLogin yes`

PasswordAuthentication yes 改为 PasswordAuthentication no
5、重启ssh sudo service ssh restart
6、passwd root 设置密码
7、ifconfig 查看容器实例ip
8、ssh ip

猜你喜欢

转载自www.cnblogs.com/lijiale/p/10213587.html
今日推荐