SSH提示Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

來源:互聯網
上載者:User
作業環境 Docker
Centos7
問題描述 在Docker中建立centos 7 container,sshd進程啟動後,通過docker 宿主機ssh串連該container,提示資訊:
[root@centos-cloudera-1 ~]# ssh 10.10.200.4The 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)? yesWarning: 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.4root@10.10.200.4's password: 




聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.