delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <494E946B.6080208@cygwin.com> |
Date: | Sun, 21 Dec 2008 14:09:31 -0500 |
From: | "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081120 Remi/2.0.0.18-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.18 Mnenhy/0.7.5.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How to force sftp to expect a password from the keyboard in the batch mode |
References: | <001101c9636c$ee020f60$ca062e20$@net.ru> |
In-Reply-To: | <001101c9636c$ee020f60$ca062e20$@net.ru> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Alexander M. Batishchev wrote: > Hello! > 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 user AT frs DOT sourceforge DOT net > Connecting to frs.sourceforge.net... > user AT frs DOT sourceforge DOT net's password: > sftp> > > but in the batch mode it doesn't asks a password and doesn't logins: > > $ cat batch > cd uploads > $ sftp -b batch user AT frs DOT sourceforge DOT net > 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, > unfortunately. Not knowing much about 'sftp' myself, I took a look at the man page. Here's what it says: -b batchfile 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 _____________________________________________________________________ A: Yes. > 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 Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |