How to Configure the Number of FTP Client Login Attempts

Ramiro MartinezRamiro Martinez Posts: 46 admin

Problem:
In SOAtest 9.5 (or older version), the FTP client will login with the same user credential 6 times if the provided credential is incorrect. This often will prevent the same user from connecting again since the account will be locked due to multiple failed logins.

Here is the response:

Starting FTP Session: FTP-host

The authenticity of host 'FTP-host' can't be established.

RSA key fingerprint is e9:34:ee:d7:c5:80:29:8c:f7:33:a2:a7:ba:f5:80:74.

Are you sure you want to continue connecting? yes

Password for user@FTP-host*****
Password for user@FTP-host*****
Password for user@FTP-host*****
Password for user@FTP-host*****
Password for user@FTP-host*****
Password for user@FTP-host*****

Solution:
We can set the number of login attempts by updating the jsch jar file to the latest version and create an extension tool that invoke setConfig("MaxAuthTries", "1") method call.

Note: This workaround is only available in SOAtest version 9.5.x.

  1. Close SOAtest if it is already open.

  2. download the latest jsch.jar file from http://www.jcraft.com/jsch/

  3. replace the jar file under /eclipse/plugins/com.parasoft.xtest.libs.web_{ver}/root/jsch.jar with latest version. (Please rename the jsch-version.jar file to jsch.jar)

  4. Start SOAtest and add a new Extension Tool in front of the FTP client.

  5. In the extension tool, select language as Groovy and enter the following script:

import com.jcraft.jsch.*

void setMaxAuthTries() {
JSch.setConfig("MaxAuthTries", "1")
}

  1. run the Extension tool and the FTP client, the failure login attempt should now be reduced to one instead of six.

Starting FTP Session: FTP-host
The authenticity of host 'FTP-host' can't be established.
RSA key fingerprint is e9:34:ee:d7:c5:80:29:8c:f7:33:a2:a7:ba:f5:80:74.
Are you sure you want to continue connecting? yes
Password for user@FTP-host*****

Tagged:
Sign In or Register to comment.