是否可以在 CentOS 5.7 中启用密码认证或密钥认证?我能找到的只是将 PasswordAuthentication 设置为 no ,这会强制使用密钥...
谢谢
禁用PasswordAuthentication
不会强制使用密钥,它会禁用密码身份验证,正如宣传的那样。
PubkeyAuthentication
确定是否允许密钥认证。
因此,要直接回答您的问题,以下配置允许密码或密钥身份验证:
PasswordAuthentication yes
PubkeyAuthentication yes
Run Code Online (Sandbox Code Playgroud)
你的意思是你想要这样的东西:
Match User user1
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
Match User user2
PasswordAuthentication yes
RSAAuthentication no
PubkeyAuthentication no
Run Code Online (Sandbox Code Playgroud)