I am having an issue with lftp where it gets stuck on

`ls' at 0 [Connecting...]

for an SFTP connection.


  • Linux 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 4 14:55:32 EST 2024 x86_64 x86_64 x86_64 GNU/Linux
  • LFTP | Version 4.4.8

Here how I am running it:

user@server:~$ lftp -d
lftp :~> open -u Uname,Passwd -p 22 sftp://test.host.com
lftp [email protected]:~> ls
---- Running connect program (ssh -a -x -s -l Uname -p 22 test.host.com sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- Password authentication
`ls' at 0 [Connecting...]

I tried using the various lftp set commands with no luck.

I then tried connecting using the sftp client on Linux and it works.

user@server:~$ sftp -oPort=22 [email protected]
Password authentication
Uname's password
Connected to test.host.com.
sftp> ls
In  Out  Received

I had already done the host key fingerprint verification and it exists in the /home/user/.ssh/known_hosts file.

Not sure why it is not working when using lftp.

Edit 1:

user@server:~$ lftp sftp://test.host.com
lftp test.host.com:~>

Edit 2 (using ssh):

user@server:~$ ssh [email protected]
Password authentication
Uname's password
PTY allocation request failed on channel 0

Sorry, SFTP Only - pty-req not allowed.
Connection to test.host.com closed.
  • Does lftp sftp://test.host.com connect?
    – eyoung100
    Feb 29 at 22:57
  • Yes, from what I can tell. Feb 29 at 23:01
  • try ~>login user password now We're trying the "normal login" process before trying the daemon method
    – eyoung100
    Feb 29 at 23:05
  • @eyoung100 - just tried login user password and the result is the same (i.e. stuck on connecting.....) Feb 29 at 23:09
  • I think you may need to redo your RSA keys.
    – eyoung100
    Feb 29 at 23:38


You must log in to answer this question.

Browse other questions tagged .