In the jsch source, the class JSch has a block of static code to set up the 
configuration that includes  config.put("MaxAuthTries", "6") changing this to a 
smaller number and rebuilding the jar from this source is one solution.

>-----Original Message-----
>From: mcook144sw [mailto:[email protected]]
>Sent: 13 February 2013 19:42
>To: [email protected]
>Subject: sshexec host login task auth fail multiplies
>
>I am using the following sshexec command to login to a linux server and
>verify the users access.
>
>    <sshexec host="${targetServer}"
>             username="${userId}"
>             password="${userPw}"
>             trust="true"
>             command="${sudoCommand} whoami"/>
>
>Whenever a user types an incorrect password in our tool, it will fail with a
>"com.jcraft.jsch.JSchException: Auth fail" error that will lock them out of
>their linux account due to too many failed attempts.  Even though the
>sshexec command was only called once.  It seems that this one failed login
>is registering as 7 failed attempts on the linux side.  When you type the
>correct password it works fine.
>
>I looked in the Apache Ant documentation, but could not find anything on a
>way to fix this.  I thought that it may have to do with the jsch.jar
>defaults too, but I could not see anything that made sense from that side
>either.  Additionally, I looked into a SSH client configuration file as an
>option, but the settings available do not seem to apply.
>
>Does anyone know of how one can restrict the number of failed login
>attempts
>to one??  Or another way to fix this??
>
>Thanks,
>
>Mike
>
>
>
>--
>View this message in context: http://ant.1045680.n5.nabble.com/sshexec-
>host-login-task-auth-fail-multiplies-tp5713848.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to