0

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'?

0

1 Answer 1

1

The /nointeractiveinput switch should actually help in this scenario.

Make sure you are using the latest version of WinSCP.

Sign up to request clarification or add additional context in comments.

1 Comment

Updating to the newest version helped. Now it works as expected. The older version (4.x) that I used didn't complain about the switch so I was assuming it was a valid one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.