ant - SCP / SSHEXEC - number of connection attempts -
i using scp task followed sshexec in ant build.xml. derive value password password field on screen. user doesnt have ability check if right password or not until task completes successfully.
as result, if entered password incorrect, scp / sshexec retry connect? there handle limit number of connection retries?
the sshexec
, scp
tasks use java secure channel jsch, see ant manual library dependencies.
had similiar problem, jsch tries authenticate 6 times configured in com.jcraft.jsch.jsch class. when wrong password used, user account got locked.
patched com.jcraft.jsch.jsch class :
from :
config.put("maxauthtries", "6");
to :
config.put("maxauthtries", "3");
means jsch try 3 times authenticate.
-- edit after comment --
download jsch release zip here - latest version 0.1.51
unzip
open jsch-0.1.51/src/main/java/com/jcraft/jsch/jsch.java
change line 124
from
config.put("maxauthtries", "6");
to
config.put("maxauthtries", "3");save
run jsch-0.1.51/build.bat or build.sh according os
use jsch-0.1.51/dist/lib/jsch-0.1.5.jar
Comments
Post a Comment