如何设置SSH远程连接docker容器
@https://blog.csdn.net/hwijew/article/details/88171749
@https://blog.csdn.net/lhyhaiyan/article/details/128546411
安装ssh server
1 | apt-get update |
启动SSH服务
1 | ssh start |
查看SSH服务的状态
1 | service ssh status |
设置root密码和配置文件
1 | passwd root |
增加以下内容:
1 | #启用 RSA 认证 |
重启SSH
1 | service ssh restart |
远程连接
1 | ssh root@127.0.0.1 -p 1022 |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.