FW: openssh 4.0 - sftp batch mode behavior

Damien Miller djm at mindrot.org
Fri Jun 3 16:07:27 EST 2005


Simpson Searcy - ssimps wrote:
> Hello,
> I just installed the openssh 4.0 for Solaris. The users have reported a
> difference in behavior when using the batch mode of sftp client.
> 
> Previously they could issue the following command sftp -b batchfile
> user at hostname and in the absence of publickey authentication they would
> be issued the password prompt and they could enter password and the
> process would continue.

The old behaviour was buggy: sftp's -b uses ssh's BatchMode config
option. From ssh_config(5):

> BatchMode
>    If set to ``yes'', passphrase/password querying will be disabled.
>    This option is useful in scripts and other batch jobs where no
>    user is present to supply the password.  The argument must be
>    ``yes'' or ``no''.  The default is ``no''.

I.e. a sftp client in batch mode shouldn't require any interaction to
function. This stops it from blocking or otherwise misbehaving in
scripts.

If your users need scripted transfers, they can try:

sftp user at host < batchfile

-d




More information about the openssh-unix-dev mailing list