I'm using WinSCP CLI to script a file transfer. I'm using the private/public key authentication only, the password is not set.
WinSCP.com /nointeractiveinput
/command "open sftp://USER@HOST/ -privatekey=PATH_TO_KEY ..."
...
I am testing error situations now. One error situation is that key authentication can fail. In this case the password prompt is presented and the script blocks. Calling /nointeractiveinput ... doesn't help, since it will not skip the password prompt.
Question: What can I do to skip the password promt and let the script fail if key authentication doesn'?