Fwd: sftp with an encrypted key

Alexander Lukyanov <[email protected]> Tue, 9 Dec 2014 15:08:16 +0400
Newsgroups gmane.network.lftp.user
Message-ID <CANnoEwoa2tUtX16hM-Ht5CLZC5mfwWuuMn5DJ075yiUuy2hzEw@mail.gmail.com>
Specify the passphrase for the key as password for the connection. In the
example you have provided, you have specified an empty passphrase, thus it
failed to decrypt the key.

If you don't want to give the passphrase in cleartext, don't specify a
password in the URL and lftp will ask for a password, type the passphrase
at the prompt.

2014-12-09 13:01 GMT+03:00 Andrew Schulman <[email protected]>:

> To connect to an sftp site using an SSH private key, the standard advice is
> to use
>
>   set sftp:connect-program ssh -a -x -i /path/to/key
>
> If the private key is unencrypted, this works fine.  (A key loaded in a
> running ssh-agent also works fine, without the above.)  But if the key is
> encrypted, the password prompt seems to be blocked:
>
> $ lftp sftp://cygwin:@cygwin.com
> lftp [email protected]:~> set sftp:connect-program ssh -a -x -i
> /path/to/key
> lftp [email protected]:~> ls
> `.' Delaying before reconnect: 30
>
> The text
>
>   `.' Enter passphrase for key '/path/to/key': XXXX
>
> sometimes appears briefly on the screen.  Eventually the connection
> fails.
>
> It seems that lftp is blocking the password input from the console.  Is
> this a known problem?  Any idea how hard it would be to fix?
>
> lftp 4.6.0 in Cygwin x86_64.
>
> Thanks,
> Andrew
>
> _______________________________________________
> lftp mailing list
> [email protected]
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>

-- 
   Alexander.

_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp