This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygport improvements: upload, fish, src_prep_fini_hook


> On Dec  8 20:40, Andrew Schulman wrote:
> > > > Here's what I have at the moment based on your branch as of a few weeks 
> > > > ago.  However, with password-protected SSH keys, the password prompt 
> > > > isn't handled properly.  Any ideas?
> > > 
> > > Re password prompts: I see the problem.  It's because I echo the lftp
> > > script to stdout, and pipe it into lftp -f /dev/stdin.  So stdin is
> > > unavailable for the password prompt.
> > > 
> > > I think using process substitution instead will be an easy fix for this.
> > 
> > OK, I looked into this.  Unfortunately lftp seems not to support using
> > encrypted SSH keys for sftp.
> > 
> > First I freed up stdin for lftp to use, by using process substitution 
> > instead of -f/dev/stdin, as I said before.  But it still doesn't work.
> > 
> > So I tried it with lftp from the command line.  With an unencrypted key it 
> > works, but with an encrypted key you get the following:
> > 
> > $ lftp sftp://cygwin:@cygwin.com
> > lftp cygwin-rDBXBDvO6BXQT0dZR+AlfA@public.gmane.org:~> set sftp:connect-program ssh -a -x -i /path/to/encrypted/key
> > lftp cygwin-rDBXBDvO6BXQT0dZR+AlfA@public.gmane.org:~> ls
> > `.' Enter passphrase for key '/home/andrex/.ssh/keys/home': XXXX
> > 
> > and the connection fails.  It seems that lftp intercepts the password 
> > prompt.

OK, my mistake.  lftp author reminded me that this is only happening
because I specified an empty passphrase in the connect string:  colon after
cygwin in "sftp://cygwin:@cygwin.com";.

So I'll take another look and fix this.

> I may be missing something here, but given that this is all scripted
> anyway, why not use sftp directly?

I did code an alternate implementation using sftp, but it had some
disadvantages.  I think the main one was that sftp doesn't have a recursive
delete or mirror, so I had to write a bunch of kludgy rm's.

Both ways work, with minor disadvantages.

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]