SSH prompts permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Source: Internet
Author: User
Tags ssh

Operating Environment

Docker

Centos7

Problem Description


After the new CentOS 7 container,sshd process starts in Docker, the container is connected through the Docker host SSH, prompting for information:

[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 your 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).

Solving Method

1. Remove the existing Openssh-server by Yum and reinstall Openssh-server

#yum-y Remove openssh-server
#yum-y install Openssh-server

2. Set Key #
#sshd-keygen

3. Modify the Pubkeyauthentication option in the Sshd_config configuration file to set this option to Yes
Pubkeyauthentication Yes

4. Start sshd
#/usr/sbin/sshd

5. Connect the container through another server
[Root@centos-cloudera-1 ~]# ssh 10.10.200.4




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.