putty: server refused our key不能用證書登陸問題解決

putty: <wbr>server <wbr>refused <wbr>our <wbr>key不能用證書登陸問題解決

xshell同樣登陸不了

我用putty配置了自動登錄到服務器組成的cluster,今天突然出現錯誤
server refused our key
要輸入用戶密碼才能登錄

折騰了半天也沒找到原因

最後發現是權限的問題導致,ssh登陸默認爲“嚴格”模式

解決方案一:

[root@localhost zhangkai2]# chmod 700 .ssh

[root@localhost .ssh]# chmod 600 authorized_keys*
.ssh目錄權限是700
.ssh裏面的文件權限是600

 

解決方案二:

修改sshd_config的配置,需要StrictModes no。

vim vim /etc/ssh/sshd_config

/etc/init.d/sshd restart

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章