2

I've been trying to use lftp over SFTP but I somehow can't get it to connect properly.

I issue the command (which as far as I can tell is the same as the one for sftp), lftp prompts me for the password, which I input, and the lftp prompt appears! This all seems good, but I can't do anything afterwards.

Here's an illustration:

myuser $ lftp myuser@server.edu                                                                                                                                    
Password: 
lftp myuser@server.edu:~> ls                   
`ls' at 0 [Connecting...]  

and then it gets stuck there. Note that if I issue sftp myuser@server.edu and input the password everything works flawlessly. Am I missing something obvious?

I'm using lftp version 4.9.2.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
TomCho
  • 3,204
  • 6
  • 32
  • 83

2 Answers2

1

The lftp is primarily an FTP client. If you want it to use SFTP, you have to tell it so:

lftp sftp://myuser@server.edu
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
0

I was seeing this problem because I tried using lftp without trying sftp or ssh first.

The latter programs were prompting me to accept an SSH fingerprint. But lftp was suppressing this prompt, and just showing `ls' at 0 [Connecting...] forever.

I had to attempt a connection with ssh/sftp first and accept the fingerprint, which added it to my ~/.ssh/known_hosts file. After this, lftp sftp://... could connect fine.

mwfearnley
  • 3,303
  • 2
  • 34
  • 35