Group: Forum Members
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. ;)