Re: Input prompt is cancelled after short time interval
Well, if your script is interactive, do not run it in non-interactive mode, at least during the authentication.
option batch off
open sftp://user@example.com/
option batch abort
...