sftp utility - number of password attempts


Author
Message
mrrex4
mrrex4
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 9
Hi,

I am developing a Java application that is designed to upload files via the sftp.exe utility.  In an effort to account for all possible outcomes, I believe I am running into an issue with the sftp utility providing the ability to try and re-enter a password an additional two times.

From the perspective of sftp, I am running the command with all necessary options to pass the username, password, server, and default directory on the first attempt.  When I run this from the command prompt with an incorrect password, I get prompted to enter a password.  I believe this is where my Java program is hanging because it is waiting for sftp to close on it's own.

Therefore, is it possible for the sftp utility to simply return to the standard error stream "Incorrect username/password" with no ability to re-type a password if using the -A option?

I would imagine that this could be a very simple update to the utility.

Otherwise, I would love to just have a Java API for working directly with the sftp utility.  ;)

v/r,

Brendan
bethredd
bethredd
Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)Pragmateer (97 reputation)
Group: Administrators
Posts: 81, Visits: 180
Hello Brendan,

You can alter the number of password attempts using the option numberofpasswordprompts.

This can be passed as an option to the sftp client with:
sftp -onumberofpasswordprompts=1 user@host

or it can be entered in the .config file of the ssh client, which should be located in the PragmaSSH subdirectory of the users %APPDATA% directory.

Please check our online documentation at www.pragmasys.com/Fortress/WebHelp under the topic What comes with Fortress SSH Server > Remote Access Clients > Console SSH Client > SSH Configuration File.

We have had multiple request for a Java API, so it is a possible future feature.

Beth Redd 
Customer Support Manager 
13809 Research Blvd, #675 
Austin, TX 78750 
http://www.pragmasys.com
 
Follow us on    



Beth Redd
mrrex4
mrrex4
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 9
Beth,

That is awesome.  I will give that a try.

Also, I took a look at the link provided and thank you for that as well.  There are a few other options in there that I was going to look for, but no longer need to.

Thanks!

Brendan
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search