
我正在使用最新版本的全新安裝RockyLinux 9
。我正在嘗試停用基於 SSH 的 GSSAPI 登入以及密碼,並僅允許基於公鑰的登入。根據 ssh 客戶端提示符的輸出,設定似乎並沒有真正停用GSSAPIAuthentication no
它。sshd_conf
是否還需要其他配置參數?
$ grep -i gss /etc/ssh/sshd_config
# GSSAPI options
GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no
# service sshd restart
#on an another host
$ ssh [email protected]
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
答案1
/etc/ssh/sshd_config.d 中有什麼? 50-redhat.conf 似乎啟用了它,並且很早就包含了它。據我記得 sshd_config 中的第一次出現獲勝。
以下評論:請查看Include
ssh_config 和 sshd_config 的設定指令。至少從 RHEL 8 的 ssh_config 開始,它就已經存在,並在 RHEL 9 的 sshd_config 中引入。