Skip to content

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

@zhangpfly

Description

@zhangpfly

使用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

这个怎么解决?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions