docker运行centos使用ssh连接

时间:2024-11-01 18:47:41

1、拉取centos7镜像docker pull centos:centos7

docker运行centos使用ssh连接

3、进入centos容器

docker运行centos使用ssh连接

5、启动ssh服务systemctl start sshd

docker运行centos使用ssh连接

8、设置linux容器的密码passwd root

docker运行centos使用ssh连接

10、运行新镜像

docker运行centos使用ssh连接

11、使用ssh连接centos容器ssh root@宿主机的ip -p 10022

© 2025 长短途
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com