-batch
: avoid interactive prompts
If you use the -batch
option, PSFTP will never give an interactive prompt while establishing the connection. If the server's host key is invalid, for example (see section 2.2), then the connection will simply be abandoned instead of asking you what to do next.
This may help PSFTP's behaviour when it is used in automated scripts: using -batch
, if something goes wrong at connection time, the batch job will fail rather than hang.