is it possible to use ssh in pod?

2019-03-01 11:45发布

I made hadoop image based on centos using dockerfile. There are 4 nodes. I want to configure cluster using ssh-copy-id. But an error has occurred.

ERROR: ssh: connect to host [ip] port 22: Connection refused

How can I solve this problem?

1条回答
祖国的老花朵
2楼-- · 2019-03-01 12:41

ssh follows a client-server architecture. So, the openssh-server has to be installed in the container. Now ssh-copy-id and other commands should run if the ip address is routable.

查看更多
登录 后发表回答