- 论坛徽章:
- 0
|
本帖最后由 lylklb 于 2010-03-08 19:03 编辑
To doging:
非常感谢!
我按照你的方法,做了如下测试! 与原来不同的是, 突破了原有客户端的默认三次设置, 但目前始终只能停留在服务齐端的默认六次!! (尽管我已将MaxAuthTries为20的sshd服务守护进程已重启过!!)
sunv480-1 #
sunv480-1 # vi ssh_config
"ssh_config" 33 lines, 900 characters
# Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
# ident "@(#)ssh_config 1.2 01/10/08 SMI"
#
# This file provides defaults for ssh(1).
# The values can be changed in per-user configuration files $HOME/.ssh/config
# or on the command line of ssh(1).
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file /etc/ssh/ssh_config
#
# Any configuration value is only changed the first time it is set.
# host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Example (matches compiled in defaults):
#
# Host *
# ForwardAgent no
# ForwardX11 no
PubkeyAuthentication no
# PasswordAuthentication yes
# FallBackToRsh no
# UseRsh no
# BatchMode no
# CheckHostIP yes
# StrictHostKeyChecking ask
# EscapeChar ~
NumberOfPasswordPrompts 15
~
~
"ssh_config" 32 lines, 883 characters
sunv480-1 #
sunv480-1 #
sunv480-1 # ssh user2@sunv480-2
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Received disconnect: 2: too many failed userauth_requests
sunv480-1 #
sunv480-1 #
sunv480-1 #
sunv480-1 # ssh -o NumberOfPasswordPrompts=15 user2@sunv480-2
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Permission denied, please try again.
user2@sunv480-2's password:
Received disconnect: 2: too many failed userauth_requests
sunv480-1 #
sunv480-1 #
注: 在最后的实际调测中发现, 仅当sshd_config中的MaxAuthTries参数设为≤6时, 客户端的NumberOfPasswordPrompts是成功生效的! 但当MaxAuthTries设定>6时, 客户端的NumberOfPasswordPrompts的实际生效值永远停留在6!! 这是为何呢!? |
评分
-
查看全部评分
|