I am using Pragma secure FTP in a script that runsautomatically.
Due that we are testing this script, we want to make surethat wherever the execution of sftp fails, the scripts execution can beterminated.
We are presenting an issue by putting a wrong username (fortest reasons) to log on server. It supposed that needs to have 3 attempts ofre-enter password and exit sftp, but the process stops on the Enter Passwordfield, and the scripts keeps processing.
We already check the script code and the Pragma certificate.
We run the same sftp script inUNIX (shell), with any invalid username, and the process keeps running andfinishes successfully.
The issue that we are facing isthat, the same sftp script in Windows (batch) it is being tested with anyinvalid username, but the process stops, asking for password, and the executionnever finishes.
We would like to know if there is a way to automaticallyre-enter a password three times, so the connection can be closed, and thescripts execution terminates; or just identify the wrong username and close the sftp execution.
sftp -oidentityFile2=%SSHKEY% -v -b %BATCHFILE% -L%FTPLOGFILE%.sftp %TUSER%@%TIPA%