SSH提示Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
操作环境DockerCentos7问题描述在Docker中新建centos 7 container,sshd进程启动后,通过docker 宿主机ssh连接该container,提示信息:Permission denied (publickey,gssapi-keyex,gssapi-with-mic).解决方法1.通过yum删除现有的open
·
操作环境
Docker
Centos7
问题描述
在Docker中新建centos 7 container,sshd进程启动后,通过docker 宿主机ssh连接该container,提示信息:
[root@centos-cloudera-1 ~]# ssh 10.10.200.4
The authenticity of host '10.10.200.4 (10.10.200.4)' can't be established.
ECDSA key fingerprint is SHA256:Xn2tjX3zW88QjDbirg7a1K39jYYvCz2Vd13iiehP2p0.
ECDSA key fingerprint is MD5:1d:76:e4:ec:59:70:8c:7d:da:4b:e9:d7:f2:d0:4b:47.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.10.200.4' (ECDSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
解决方法
1.通过yum删除现有的openssh-server,然后重新安装openssh-server
#yum -y remove openssh-server
#yum -y install openssh-server
2.设置密钥
#
#sshd-keygen
3.修改sshd_config配置文件中的PubkeyAuthentication选项,设置该选项值为yes
PubkeyAuthentication yes
4.启动sshd
#/usr/sbin/sshd
5.通过其他服务器连接该container
[root@centos-cloudera-1 ~]# ssh 10.10.200.4
root@10.10.200.4's password:
更多推荐
已为社区贡献6条内容
所有评论(0)