jumpserver / coco

Jumpserver ssh/ws server
GNU General Public License v3.0
157 stars 126 forks source link

docker启动jms_coco容器,sshd 2222端口报错 #223

Open zhangpfly opened 5 years ago

zhangpfly commented 5 years ago

使用docker命令

docker run --name jms_coco -d -p 2222:2222 -p 5000:5000 -e CORE_HOST=http://192.168.32.134:8080 -e BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN jumpserver/jms_coco:1.5.0

启动完jms_coco,可以看到主机的2222端口已经被监听。但是ssh连接失败。

[root@ceshi ~]# ssh -p2222 zhangpf@192.168.32.134
ssh: connect to host 192.168.32.134 port 2222: Connection refused

进入容器启动ssh服务显示如下信息

[root@ceshi ~]# docker exec -it jms_coco /bin/bash 
[root@36405f2748cc opt]# systemctl restart sshd
Failed to get D-Bus connection: Operation not permitted

这个怎么解决?

roamerop commented 4 years ago

同求