Discussion:
Can't connect to FreeBSD sftp
Michael Ross
2014-02-19 01:16:44 UTC
Permalink
Hello,


I can't connect to any FreeBSD-sftp servers.

I get this in my sshd log:

Feb 19 02:00:14 host sshd[74322]: Connection from x.x.x.x port 63552
Feb 19 02:00:14 host sshd[74322]: Failed publickey for michael from
x.x.x.x port 63552 ssh2
Feb 19 02:00:14 host sshd[74322]: Postponed keyboard-interactive for
michael from x.x.x.x port 63552 ssh2 [preauth]

and there the connection stalls, lftp stays at

---> sending a packet, length=5, type=1(INIT), id=0
»ls« bei 0 [Verbinde...]

I tried lftp 4.4.0 and 4.4.15 (on FreeBSD 9.2), 4.4.9 (on Cygwin), 4.4.14
(on FreeBSD 9.1),
they all connect to other sftp-servers fine, but not to any of me FreeBSD
ones.

At the same time, the sftp servers seem to be alright, I can connect to
them using other clients.


What can I do?

Regards,

Michael
Alexander Lukyanov
2014-03-11 09:02:41 UTC
Permalink
I think you can try to use strace to find out what data lftp receives from
the connection (if any). Then compare that with the data lftp receives from
other sftp servers.
Also it would help if you provided me with access to a FreeBSD sftp account.
--
Alexander.
Post by Michael Ross
Hello,
I can't connect to any FreeBSD-sftp servers.
Feb 19 02:00:14 host sshd[74322]: Connection from x.x.x.x port 63552
Feb 19 02:00:14 host sshd[74322]: Failed publickey for michael from
x.x.x.x port 63552 ssh2
Feb 19 02:00:14 host sshd[74322]: Postponed keyboard-interactive for
michael from x.x.x.x port 63552 ssh2 [preauth]
and there the connection stalls, lftp stays at
---> sending a packet, length=5, type=1(INIT), id=0
»ls« bei 0 [Verbinde...]
I tried lftp 4.4.0 and 4.4.15 (on FreeBSD 9.2), 4.4.9 (on Cygwin), 4.4.14
(on FreeBSD 9.1),
they all connect to other sftp-servers fine, but not to any of me FreeBSD
ones.
At the same time, the sftp servers seem to be alright, I can connect to
them using other clients.
What can I do?
Regards,
Michael
_______________________________________________
lftp mailing list
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Michael Ross
2014-03-11 14:20:53 UTC
Permalink
Post by Alexander Lukyanov
I think you can try to use strace to find out what data lftp receives from
the connection (if any). Then compare that with the data lftp receives from
other sftp servers.
Also it would help if you provided me with access to a FreeBSD sftp account.
strace is not available for FreeBSD 64bit, so I used "truss".

Output here: http://gurder.ross.cx/misc/lftp/

As far as I can make sense of it, the password is not send,

in test-good ( Linux machine AFAIK ):
read(8,"***@www.ross.cx's password:"...,65536) = 33 (0x21)
read(6,0x8039fa000,65536) ERR#35 'Resource temporarily unavailable'
wait4(86218,{ EXITED,val=0 },WNOHANG|WUNTRACED,0x0) = 0 (0x0)
madvise(0x8039e9000,0x11000,0x5,0x1e8,0x7fffffffce90,0xffffffff) = 0 (0x0)
madvise(0x803a13000,0x8000,0x5,0x212,0x7fffffffcf80,0xffffffff) = 0 (0x0)
madvise(0x803a0b000,0x1000,0x5,0x20a,0x7fffffffcf80,0xffffffff) = 0 (0x0)
madvise(0x803978000,0x1000,0x5,0x177,0x7fffffffcf80,0xffffffff) = 0 (0x0)
read(8,0x803a6b025,65536) ERR#35 'Resource temporarily unavailable'
write(8,"XXXXXXXX\n",10) = 10 (0xa)


in test-bad:
read(8,"Password for ***@lftp:",65536) = 23 (0x17)
read(6,0x8039fa000,65536) ERR#35 'Resource temporarily unavailable'
wait4(86221,{ EXITED,val=0 },WNOHANG|WUNTRACED,0x0) = 0 (0x0)
madvise(0x8039e9000,0x11000,0x5,0x1e8,0x7fffffffcf70,0xffffffff) = 0 (0x0)
madvise(0x803978000,0x1000,0x5,0x177,0x7fffffffcf70,0xffffffff) = 0 (0x0)
read(8,0x803a0b017,65536) ERR#35 'Resource temporarily unavailable'
read(6,0x8039fa000,65536) ERR#35 'Resource temporarily unavailable'
wait4(86221,{ EXITED,val=0 },WNOHANG|WUNTRACED,0x0) = 0 (0x0)
poll({8/POLLIN 6/POLLIN},2,241) = 0 (0x0)
read(8,0x803a0b017,65536) ERR#35 'Resource temporarily unavailable'
read(6,0x8039fa000,65536) ERR#35 'Resource temporarily unavailable'
wait4(86221,{ EXITED,val=0 },WNOHANG|WUNTRACED,0x0) = 0 (0x0)
poll({8/POLLIN 6/POLLIN},2,500) = 0 (0x0)
read(8,0x803a0b017,65536) ERR#35 'Resource temporarily unavailable'
read(6,0x8039fa000,65536) ERR#35 'Resource temporarily unavailable'

and the last lines keep repeating until I kill the process.


Sending you account details privately,

Thank you,

Michael
Alexander V. Lukyanov
2014-03-13 08:17:29 UTC
Permalink
So the prompt is different. I suspect that lftp did not recognize the second
prompt for password. I'll have to fix it.

--
Alexander.
Alexander V. Lukyanov
2014-03-14 12:43:19 UTC
Permalink
Post by Alexander V. Lukyanov
So the prompt is different. I suspect that lftp did not recognize the second
prompt for password. I'll have to fix it.
Please review or test this patch.
--
Alexander.
Michael Ross
2014-03-14 17:23:02 UTC
Permalink
Post by Alexander V. Lukyanov
Post by Alexander V. Lukyanov
So the prompt is different. I suspect that lftp did not recognize the second
prompt for password. I'll have to fix it.
Please review or test this patch.
Tested and confirmed working.

Thanks a lot!

Michael

Loading...