SSH Error : No supported authentication methods available

Ideal place for discussions related to Linux/Windows server security, Apache, MySQL, MS SQL and PHP, including tutorials and questions.
Site Admin
Posts: 50
Joined: Thu May 30, 2013 10:28 pm

SSH Error : No supported authentication methods available

Postby hrdedicated » Fri May 31, 2013 2:02 pm


When you try to access the server using the ssh and enter the user name you get the error "No supported authentication methods available" Which is probably the message shows that the password authentication is disabled on the server and only the login available for ssh key base authentication. You can setup the ssh Key using the following URL :

Setting up public key authentication over SSH
Setup public key authentication over SSH

Generate key on local machine

root@server01[~]#ssh-keygen -t rsa

It will ask you for a password but you can leave it blank.

Note you could also pick -t dsa if you prefer.
Ensure that the remote server has a .ssh directory

Make sure the server your connecting to has a .ssh directory in your home directory.
If it doesn't exist you can run the ssh-keygen command above, and it will create one with the correct permissions.

Copy your local public key to the remote server

If your remote server doesn't have a file called ~/.ssh/authorized_keys2 then we can create it.
If that file already exists, you need to append to it instead of overwriting it, which the command below would do:

root@server01[~]#scp ~/.ssh/ root@remoteserverip:/root/.ssh/authorized_keys2

Now ssh to the remote server

Now you can ssh to the remote server without entering your password.

Now keep in mind that all someone needs to login to the remote server, is the file on your local machine ~/.ssh/id_rsa, so make sure it is secure.

Return to “System Security”

Who is online

Users browsing this forum: No registered users and 1 guest