1

I can successfully connect to ftp server using filezilla with SFTP protocol.

But when I try to connect using lftp, and send ls command for listing remote folder, it just keeps on showing status connecting...

Here is my lftp command:

$ lftp -p 22222 -u dev001 sftp://111.222.333.444
Password: 
lftp [email protected]:~> debug
lftp [email protected]:~> ls
---- Running connect program (ssh -a -x -s -l dev001 -p 22222 111.222.333.444 sftp)
---> sending a packet, length=5, type=1(INIT), id=0
The authenticity of host '[111.222.333.444]:22222 ([111.222.333.444]:22222)' can't be established.
<--- RSA key fingerprint is SHA256:xxxxxxxxxxxx/yyyyyy/zzzzzzzzz.
`ls' at 0 [Connecting...]

Please enlighten me

Thank you

1 Answer 1

1

A few minutes after posting the question, looks like I can solved it :D

I try to connect using sftp command line, and it ask to save the fingerprint, then successfully connected and work flawlessly.

$ sftp -P 22222 [email protected]

Then I retry lftp... and... it works :D

$ lftp -p 22222 -u dev001 sftp://111.222.333.444
Password: 
lftp [email protected]:~> debug
lftp [email protected]:~> ls
---- Running connect program (ssh -a -x -s -l dev001 -p 22222 111.222.333.444 sftp)
---> sending a packet, length=5, type=1(INIT), id=0
`ls' at 0 [Connecting...]
[email protected]'s password: XXXX
<--- got a packet, length=95, type=2(VERSION), id=0
---- protocol version set to 3
---> sending a packet, length=10, type=16(REALPATH), id=1
<--- got a packet, length=57, type=104(NAME), id=1
---- home set to /sftp/dev001/app
---- path on wire is `/sftp/dev001/app'
---> sending a packet, length=27, type=11(OPENDIR), id=2
<--- got a packet, length=13, type=102(HANDLE), id=2
---- got file handle 00000000 (4)
---> sending a packet, length=13, type=12(READDIR), id=3
<--- got a packet, length=6395, type=104(NAME), id=3
---- file name count=53
---> sending a packet, length=13, type=12(READDIR), id=4
---> sending a packet, length=13, type=12(READDIR), id=5
<--- got a packet, length=28, type=101(STATUS), id=4
---- status code=1(EOF), message=End of file
---- eof
drwxr-xr-x   17 dev001    sftpusers     4096 Aug 29 16:03 .
drwxr-xr-x    3 root     root         4096 Dec 23  2015 ..
-rw-r--r--    1 dev001    sftpusers       96 May 11  2016 .arcconfig
-rw-------    1 dev001    sftpusers    11022 Jul  4  2022 .bash_history
<deleted>
---> sending a packet, length=13, type=4(CLOSE), id=6
<--- got a packet, length=28, type=101(STATUS), id=5
---- status code=1(EOF), message=End of file
<--- got a packet, length=24, type=101(STATUS), id=6
---- status code=0(OK), message=Success

The problem is lftp not asking a question to save the fingerprint to known_host. I'm not sure why, maybe there's an option to activate it.

Thank you, hope that help others.

Cheers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .