lavv17 / lftp

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

command "open" does not initiate the connection: unusable with simpleSSHD on android #730

Open noelk opened 3 months ago

noelk commented 3 months ago

Hello, a forwarded bug from https://bugs.debian.org/940272

--8<-- The "open" command does not initiate the connection, and it appears impossible to do that. This makes lftp unusable with SimpleSSHD under Android when a key hasn't been defined yet, for instance. There is no such issue with sftp.

The problem is the following: when SimpleSSHD has just been installed, there isn't a key yet. Thus, when one connects by sftp, SimpleSSHD outputs a random, temporary password for security. The password is provided only once one has initiated the connection (since it will change at each connection). The problem with lftp is that when it asks the password, it hasn't initiated the connection, so that one does not know the password.

Note: If one gives a dummy password, lftp tries to connect, and SimpleSSHD outputs the password that should have been used. But after the login failure, lftp closes the connection, so that at the next connection the password will change. Thus this does not solve the problem.

Note: This method with the random, temporary password must be used in order to upload the key in authorized_keys. --8<--

Thank you.