Skip to Content

Authentication by key or password not supported

How to fix Authentication by key or password not supported while trying to login to remote servers?


Overview: This article explains how to fix the "Authentication by key or password not supported" error by enabling PasswordAuthetication or PubkeyAuthentication in sshd_config and restarting SSH.


Authentication by key not supported!
Authentication by password not supported

Step 1: Manually login to the remote server and run the below command to check the password and key-based authentication.

root@remote-server ~]# cat /etc/ssh/sshd_config | grep -i "PubkeyAuthentication\|PasswordAuthentication"

PasswordAuthentication no
PubkeyAuthentication no

Step 2: Change password or key-based authentication to yes according to the authentication method you are planning to use.

root@remote-server ~]# vim /etc/ssh/sshd_config

PasswordAuthentication yes
PubkeyAuthentication yes

root@remote-server ~]# systemctl restart sshd

Step 3: After changing the authentication, try to login to the remote server from Ezeelogin and confirm it's working fine.


Related Articles:

Authentication by ssh key failed

Failed to establish SSH session

Could not connect or access the remote servers/devices