Friday, 22 November 2019

How to Resolve "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)" Error on CentOS 7



In most of cloud images, password authentication login method is disabled in Open SSH Configuration and can be logged in using SSH private key only. Following error messages will appear while coping ssh on remote server and also will get error when login on the server using password.

[root@linuxcnf ~]# ssh-copy-id user1@lc-node1
.....................
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
[root@linuxcnf ~]#

This article describes How to Resolve "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)" on CentOS7

Step 1. Login on the remote server using authentication or console and edit the SSH configuration file /etc/ssh/sshd_config and change the "PasswordAuthentication no" to "PasswordAuthentication yes".

[root@lc-node1 ~]# vi /etc/ssh/sshd_config
……………….
PasswordAuthentication yes
……………….
[root@lc-node1 ~]#

Step 2. Restart the sshd service

[root@lc-node1 ~]# systemctl restart sshd
[root@lc-node1 ~]#

Step 3. Now try to login to verify the issue resolution.

No comments:

Post a comment