1

I try to establish an SSH connection with the Linux server of my web hosting provider. I receive the following error when using PuTTY Release 0.74 Build platform: 64-bit x86 Windows: "No supported authentication methods available (server sent: publickey, gssapi-keyex, gssapi-with-mic)"

  1. This is what I did:
  2. Generate the pair public_key - private_key
  3. Give the public_key to the provider
  4. Insert server's IP address and port in "Session"
  5. Insert the path to my locally saved private_key in "Connection -> SSH -> Auth"
  6. Save the whole configuration

Finally, if I load the configuration and try to open the connection, I receive the error message above.

1
  • "Give the public_key to the provider" – But did they set up the key on the server already? It looks like they did not. Show us PuTTY event log. Commented Nov 16, 2020 at 7:19

3 Answers 3

0

I can't say for sure whether this will resolve every incidence, and it certainly isn't the solution for cases where the public key hasn't been entered in the authorised_keys file on the server.

I updated PuTTY to the most recent version, and then the login worked. So if you are having issues try installing the latest version from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

0

You will have to copy the public key to ~/.ssh/authorized_keys or make sure your cloud provider does it. I documented it with screenshots for Google Cloud here: https://www.bingehacking.net/2022/01/putty-no-supported-authentication.html

-1

Esse erro geralmente ocorre quando a autenticação por chave pública não está configurada corretamente ou quando o servidor não permite a autenticação por senha. Aqui estão algumas soluções que você pode tentar:

Verifique a configuração da autenticação por chave pública: Certifique-se de que a chave pública correspondente à chave privada que você está usando para se autenticar esteja presente no arquivo ~/.ssh/authorized_keys no servidor CentOS. Se a chave pública não estiver presente, você precisará adicioná-la manualmente.

Verifique as permissões dos arquivos: No servidor CentOS, verifique as permissões do diretório ~/.ssh e do arquivo ~/.ssh/authorized_keys. O diretório .ssh deve ter permissões 700 (drwx------) e o arquivo authorized_keys deve ter permissões 600 (-rw-------). Caso as permissões estejam incorretas, você pode corrigi-las usando os comandos chmod 700 ~/.ssh e chmod 600 ~/.ssh/authorized_keys.

Reinicie o serviço SSH: Em alguns casos, reiniciar o serviço SSH no servidor CentOS pode ajudar a resolver o problema. Você pode fazer isso usando o comando sudo systemctl restart sshd.

Verifique as configurações do servidor SSH: Verifique o arquivo de configuração do servidor SSH (/etc/ssh/sshd_config) no servidor CentOS. Certifique-se de que a opção PasswordAuthentication esteja definida como yes para permitir a autenticação por senha. Se você fizer alguma alteração no arquivo de configuração, lembre-se de reiniciar o serviço SSH usando sudo systemctl restart sshd.

Use o método de autenticação correto: Se você estiver usando chaves públicas para autenticação, verifique se selecionou a opção correta no Putty para especificar a chave privada correspondente. Verifique também se a chave privada está no formato adequado (geralmente formato PEM).

Espero que essas soluções ajudem a resolver o problema de autenticação no CentOS pelo Putty.

2
  • Sorry, this is an English only site. Commented Jun 20, 2023 at 2:08
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 20, 2023 at 2:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .