可以在pod中使用ssh吗? [英] is it possible to use ssh in pod?

查看:648
本文介绍了可以在pod中使用ssh吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用dockerfile基于centos制作了hadoop映像.有4个节点.我想使用ssh-copy-id配置集群.但是发生了错误.

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?

推荐答案

ssh遵循客户端-服务器体系结构.因此,必须将openssh-server安装在容器中.现在,如果IP地址可路由,则ssh-copy-id和其他命令应该运行.

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.

这篇关于可以在pod中使用ssh吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆