Strovent SystemsSign in
Reference

PuTTY "No supported authentication methods available (server sent: publickey)"

PuTTY tried every login method the server allows and has none left. "server sent: publickey" means a password will never work: load your key and retry.

PuTTY shows this when it has run out of ways to log you in:

Disconnected: No supported authentication methods available (server sent: publickey)

During SSH login the server answers each failed attempt with the list of methods that can still work (RFC 4252, section 5.1). PuTTY keeps the last list it received. When it has nothing left to try from that list, it closes the connection and prints the list in the brackets. So the text in brackets is the server's rule, not PuTTY's.

OpenSSH clients report the same situation as Permission denied (publickey)., with the same list in brackets.

Read the list in the brackets

  • publickey only. The server accepts keys and nothing else. Password and keyboard-interactive login are turned off on the server, so a password will never work, however often you type it. PuTTY either had no key to offer, or the server refused the keys it offered.
  • publickey,gssapi-keyex,gssapi-with-mic. The two gssapi methods are Kerberos login (RFC 4462). Without a Kerberos ticket for that realm, they do nothing for you, so this is the same as publickey only.
  • keyboard-interactive, or password,keyboard-interactive. The server would ask for a password, but PuTTY did not try. The PuTTY manual names the cause: the option Attempt keyboard-interactive auth under Connection, SSH, Auth has been turned off. It is on by default.

If the server wants a key

Scroll up in the PuTTY window first. A line such as Server refused our key means PuTTY did offer a key and the server said no; see PuTTY "Server refused our key": why and how to fix it. If no key was offered, one of these is the cause:

  • No key is set for the session. Put your private key file in Private key file for authentication. In PuTTY 0.78 and later it is under Connection, SSH, Auth, Credentials; in older versions it is on the Auth panel itself. Go back to Session and press Save, or the setting is lost when PuTTY closes.
  • The key file could not be loaded. PuTTY reads only its own .ppk format. An OpenSSH key (id_ed25519, or a .pem file) gives "Unable to use key file" and is then skipped. Import it in PuTTYgen with Conversions, Import key, and save it as a .ppk. A .ppk saved as version 3 does not load in PuTTY 0.74 and older; see Convert a PuTTY .ppk key to OpenSSH format, and PPK version 3.
  • Pageant holds no keys. If you rely on Pageant instead of a key file, check that it is running and lists your key, and that Attempt authentication using Pageant is on.
  • Wrong user name. The server checks the authorized_keys file of the account you log in as. A key added for one account does not work for another.

PuTTY's Event Log (system menu, then Event Log) shows which keys it tried and what the server said.

If you can change the server

The usual fix is to add your public key to ~/.ssh/authorized_keys for that account, with the permissions the server insists on; see Authorized keys and permissions. PuTTYgen shows the line to paste in its "Public key for pasting into OpenSSH authorized_keys file" box.

Password login is controlled on an OpenSSH server by PasswordAuthentication and KbdInteractiveAuthentication in sshd_config. If they are off, ask the administrator before turning them back on.

Sources

Spotted a mistake? Email [email protected].