我正在检查我们的一台服务器的安全性,并希望看看SSH是否可以在validation时请求公钥,如果没有密钥存在,请使用密码和validation响应。
我似乎无法解决如何做到这一点。 有任何想法吗?
这是它已经工作的方式。 检查联机帮助页。 请注意, public key authentication是在challenge-response authentication之前进行的。
从pipe理的AUTHENTICATION部分:
The methods available for authentication are: GSSAPI-based authentication, host-based authentication, public key authentication, challenge-response authentication, and password authentication. Authentication methods are tried in the order specified above, though protocol 2 has a configuration option to change the default order: PreferredAuthentications.
尝试在详细模式下的SSH
ssh -v user@server
你应该看到这样的一行:
debug1: Authentications that can continue: publickey,keyboard-interactive
您可以在服务器和客户端禁用某些身份validation方法。 你可以改变顺序。