当我尝试通过ssh登录时,我想知道在哪里可以增加输入密码的次数?
我使用的是CentOS 6.7,在收到以下消息之前,我只需输入3次密码:
权限被拒绝(公开密钥,gssapi-keyex,gssapi-带麦克风,密码)。
我还更改了/etc/ssh/sshd_config中的配置,以将MaxAuthTries属性增加到6,但没有运气。
有什么建议吗?
更新:在查看了日志文件(/var/ log /secure)之后,我找到了原因。客户端配置为3次,然后默认断开连接。
这是日志:
Oct 28 10:24:44 DG1 unix_chkpwd[4407]: password check failed for user (root)
Oct 28 10:24:44 DG1 sshd[4404]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.100.8 user=root
Oct 28 10:24:46 DG1 sshd[4404]: Failed password for root from 192.168.100.8 port 45398 ssh2
Oct 28 10:24:47 DG1 unix_chkpwd[4409]: password check failed for user (root)
Oct 28 10:24:49 DG1 sshd[4404]: Failed password for root from 192.168.100.8 port 45398 ssh2
Oct 28 10:24:49 DG1 unix_chkpwd[4411]: password check failed for user (root)
Oct 28 10:24:51 DG1 sshd[4404]: Failed password for root from 192.168.100.8 port 45398 ssh2
Oct 28 10:24:51 DG1 sshd[4406]: Connection closed by 192.168.100.8如您所见,连接由客户端关闭。这意味着如果我们从客户端更改配置,那么我们可以有更多的时间输入密码,就像@Jan说的。
通过MaxAuthTries和NumberOfPasswordPrompts的结合,我们可以对我的问题有一个很好的看法。
非常感谢你的帮助,伙计们。
发布于 2015-10-27 14:32:23
从…
man 5 sshd_config MaxAuthTries指定每个连接允许的最大身份验证尝试数。一旦故障数达到此值的一半,则会记录其他故障。缺省值为6。
因此,如果您注释掉MaxAuthTries并重新启动sshd,您应该有6次尝试。
发布于 2015-10-27 13:34:18
MaxAuthTries参数指定每个连接允许的最大身份验证尝试数。一旦故障数达到此值的一半,则会记录其他故障。这应该设置为1。
https://unix.stackexchange.com/questions/238951
复制相似问题