LoginSignup
25
14

More than 1 year has passed since last update.

ssh で no mutual signature supported エラー

Last updated at Posted at 2022-08-20

Ubuntu22.04 から、とあるホストに ssh でアクセスしようとすると

$ ssh -i hatehate.pem hogehoge@hagehage.example.com

以下のようにエラーが出るようになった。


sign_and_send_pubkey: no mutual signature supported
hogehoge@hagehage.example.com: Permission denied (publickey).

今回は ssh-rsa を使えるようにしてみる。
なお、ssh-dss などの場合は以下の ssh-rsa を該当のプロトコルに直す。

全体の設定変更をするには

/etc/ssh/ssh_config を以下のように書き換える。

    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    HostKeyAlgorithms ssh-rsa
    PubkeyAcceptedKeyTypes ssh-rsa

    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes

自分が使うときだけの設定を変更するには

~/.ssh/config に以下を追加する。

Host hagehage.example.com
  HostKeyAlgorithms ssh-rsa
  PubkeyAcceptedKeyTypes ssh-rsa

今回一度だけ接続する場合

以下のようにして接続する。

$ ssh -o 'PubkeyAcceptedKeyTypes +ssh-rsa' -i hatehate.pem hogehogeu@hagehage.example.com
25
14
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
14