lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.1k stars 161 forks source link

pget -n (and mirror --use-pget-n) fail for SSH auth via gpg-agent #447

Open rlue opened 6 years ago

rlue commented 6 years ago

I use gpg-agent to handle SSH key authentication. It's rather complicated to set up (I wrote a blog post about it here), but the upshot is that I successfully use my GPG keys for SSH authentication, in both ssh and lftp.

More specifically, I can connect to a server with lftp, and I can download regular files (via pget) or whole directories (via mirror) without a hitch. However, if I try to initiate a multi-segmented download (via pget -n or mirror --use-pget-n), then lftp borks on trying to initiate the parallel connections. Here's the relevant debug output:

---> sending a packet, length=25, type=5(READ), id=189
<--- got a packet, length=150, type=2(VERSION), id=0
---- protocol version set to 3
---- path on wire is `/media/sdu1/thrillho/private/transmission/data/debian.iso'
---> sending a packet, length=114, type=3(OPEN), id=1
<--- got a packet, length=37, type=105(ATTRS), id=2
---- file info: size=1453978621, date=Mon Aug  1 04:37:06 2016
---> sending a packet, length=25, type=5(READ), id=18
<--- got a packet, length=150, type=2(VERSION), id=0
---- protocol version set to 3
---- path on wire is `/media/sdu1/thrillho/private/transmission/data/debian.iso'
---> sending a packet, length=114, type=3(OPEN), id=1
<--- Permission denied, please try again.
---- Disconnecting
pget-chunk: debian.iso: Login failed: Login incorrect
pget: chunk[11] error: Login failed: Login incorrect
---- Disconnecting
---- Disconnecting
---- Disconnecting
---- Disconnecting
---- Disconnecting

These errors do not occur when authenticating via actual SSH keys or username / password.

lavv17 commented 6 years ago

I think it may be a problem with gpg-agent.

rlue commented 6 years ago

Hm. Could you suggest a way to debug the problem a little further, so that I could submit a useful bug report to the GnuPG team?

lavv17 commented 6 years ago

I don't know for sure, but you can try enabling verbose logging in ssh and gpg-agent. Lftp itself just gets a login error from ssh.

чт, 26 апр. 2018, 5:10 Ryan Lue notifications@github.com:

Hm. Could you suggest a way to debug the problem a little further, so that I could submit a useful bug report to the GnuPG team?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/447#issuecomment-384490168, or mute the thread https://github.com/notifications/unsubscribe-auth/AA67XI3gkUICEjgriZwW9HpbSp4XA0CTks5tsSySgaJpZM4Ter6w .