簡言之就是ssh client更新了,不支持rsa的私鑰,導致無法登陸。
ssh登陸服務器,出現類似下面的提示:
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user/.ssh/id_rsa RSA ... agent
debug1: send_pubkey_test: no mutual signature algorithm <-- ssh-rsa is not enabled
debug1: No more authentication methods to try.
user@hostname: Permission denied (publickey).
本來以爲是key弄錯了,或者服務器被hei了。加上 -v
參數才發現問題。
解決方案也很簡單,就是在 ~/.ssh/config 中增加:
Host *
ServerAliveInterval 30
PubkeyAcceptedKeyTypes +ssh-rsa
具體原因: https://www.openssh.com/txt/release-8.2 參考:https://confluence.atlassian.com/bitbucketserverkb/ssh-rsa-key-rejected-with-message-no-mutual-signature-algorithm-1026057701.html