SSH server in most systems is by default configured to allow public-key authentication. The method will enable you to use your public and private key pair to log in to an SSH server without using a username.
When you are using public-key authentication in your server, then you can’t ssh from another server to your server. When you try to ssh from another server It shows like this:-
Steps to disable public key authentication in SSH
1. Steps to disable public key authentication in SSH
2. Open SSHd configuration file with any editor.
3. Then search for PubkeyAuthentication and set the option to yes(for enabling public key authentication) or no (to disable public key authentication). In Vi editor for searching the word “PubkeyAuthentication” enter “/” and type PubkeyAuthentication . Or in nano editor CTRL+w.
4. Then Enable Password Authentication. For enabling password authentication search the word PasswordAuthentication
then remove # on this line
And also comment (put #) on line
Senior Administrator