How to force sftp to expect a password from the keyboard in the batch mode
Larry Hall (Cygwin)
Sun Dec 21 19:10:00 GMT 2008
Alexander M. Batishchev wrote:
> I'm using Cygwin latest under WinXP and trying to upload some files to
> sourceforge.net using sftp.
> In interactive, non-batch mode everything works fine:
> $ sftp email@example.com
> Connecting to frs.sourceforge.net...
> firstname.lastname@example.org's password:
> but in the batch mode it doesn't asks a password and doesn't logins:
> $ cat batch
> cd uploads
> $ sftp -b batch email@example.com
> Permission denied (publickey,password,keyboard-interactive).
> Connection closed
> What am I doing wrong?
> Is it possible to force sftp to expect a password from the keyboard in the
> batch mode? It's impossible to me to keep the password into the batch file,
Not knowing much about 'sftp' myself, I took a look at the man page.
Here's what it says:
Batch mode reads a series of commands from an input batchfile
instead of stdin. Since it lacks user interaction it should be
used in conjunction with non-interactive authentication.
This suggests to me that you want to set up sftp to work with public
key authentication. You can look at the man page for 'sshd' and
'sshd_config' for more information on that and at 'ssh-user-config'
for some examples of how to create keys.
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin