SSH: Sign_and_send_pubkey: no mutual signature supported

Viewed 28

i tried to connect to ssh server in M1 macOS terminal like this

ssh -i {myKeyFilePath/myKeyFile.pem} user@host

but it returns

sign_and_send_pubkey: no mutual signature supported
user@host: Permission denied (publickey).

i didn't modified any ssh settings and file permission of {myKeyFile.pem} is 400 Also i can connect ssh server well by IntelliJ remote hosts. but when i tried this in terminal, it goes wrong. Is there anybody help me? :(

1 Answers

Most likely your SSH client is using ssh-rsa (RSA+SHA1) and your server has that signature algorithm disabled. SHA-1 is vulnerable and OpenSSH disabled that signature algorithm in version 8.8 (2021-09-26).

The replacement for ssh-rsa is rsa-sha2-256 and rsa-sha2-512.

Try this command:

ssh -o PubkeyAcceptedKeyTypes=rsa-sha2-256 -i {myKeyFilePath/myKeyFile.pem} user@host

If that command fails with an error regarding an unsupported key exchange, then your SSH client is probably ancient.

Use one of the following solutions:

  • update the SSH client (usually a good idea)
  • use a different SSH Key Type such as Ed25519 (recommended)
  • enable rsa-sha in the SSH server (not recommended)
Related