我想configurationsshd来要求连接使用密钥和密码进行身份validation。
我还没有看过使用PAM或其他外部身份validation方法,但我现在的猜测(基于sshd_config(5) ,这是不可能的,certificate我错了,请吗?
如果你使用openssh,我不相信你能做到这一点。 还有其他的SSH2守护进程允许扩展的SSH2指令给你一个叫“RequiredAuthentications”和“AllowedAuthentications”的指令; 两者都是用逗号分隔的列表。 你可以看到一个漂亮的兼容性图表:
http://hell.org.ua/Docs/oreilly/tcpip2/ssh/ch05_05.htm
如果这是你的要求,你应该改变你的SSH守护进程。 configuration将是:
AllowedAuthentications password,publickey RequiredAuthentications password,publickey
干杯
如果您使用密码创build证书,那么当您使用证书authenticationlogin时,将要求您input该密码。
http://novosial.org/openssh/publickey-auth/
请特别注意用密钥生成密钥的“密钥生成”,以及使用密码保护密钥login给定服务器的“密钥分配”