linuxkeysftppassphraselftp

lftp with key + passphrase


I'm using lftp to send files to an SFTP server, but I don't how to connect with key and passphrase.

So in sftp, I can do this:

sftp -i .ssh/id_rsa.mykey login@my.host.fr
Enter passphrase for key '.ssh/id_rsa.mykey': my passphrase here

So, how can I use lftp with this connection method?

I have also tried:

lftp -e "set ssl:key-file .ssh/id_rsa.mykey" sftp://my.host.fr

Solution

  • You must specify the username, and just pass anything as the password, to skip it asking.

    lftp -u user,xxx sftp://...