2022年7月17日 星期日

AWS Linux Ubuntu 22.04 -OpenSSH 金鑰登录不上去問題 -PubkeyAuthentication yes

 

如使用較新版的:OpenSSH,由於其不再接受 RSA 生成的 Key,會導致因登入出現錯誤訊息及無法登入。此為 application 層級的問題:

查看主機LOG可發現:









RSA加密演算法是一種非對稱加密演算法

網路的分享文張

https://github.com/rundeck/rundeck/issues/7274

https://bbs.archlinux.org/viewtopic.php?id=270005

https://www.openssh.com/txt/release-8.8


需要主機配置文件中添加:

> cat /etc/ssh/sshd_config
...
PubkeyAuthentication yes

PubkeyAcceptedKeyTypes=+ssh-rsa



Ubuntu 22.04
# PubkeyAuthentication yes  (預設是# 不生效)


所以要進行調整如下圖:重開機就可用金鑰登入了



 






沒有留言:

張貼留言

搜尋此網誌