Testing to a remote FTP server Globalscape Secure FTP Server that has
a SFTP add-on feature.
http://www.cuteftp.com/gsftps/ Secure FTP Server for Windows
http://www.cuteftp.com/gsftps/sftp.aspx SFTP (SSH2) Add-On Module
Using a plain sftp client to that server works for both 16KB and 64KB
(and bigger) files. (from RedHat Linux 7.2 using openssh-clients-3.1p1-2)
But using "lftp sftp://that_host" only works for the 16KB size,
and fails on 64KB or bigger.
Have you heard of any such kind of incompatibility, either with this
particular sftp server implementation or with any other? The fact
that the (really old) sftp client works kinda shifts the suspicion
towards lftp. Or could it be the old openssh library?
The particular lftp version I started with was 3.4.7, with debug 9
traces as follows:
Trying the 16KB file size and succeeding:
./lftp sftp://that_host.there.com
lftp that_host.there.com:~> user that_user that_pswd
lftp [EMAIL PROTECTED]:~> debug 9
lftp [EMAIL PROTECTED]:~> cd place
---- Running connect program (ssh -a -x -s -l that_user
that_host.there.com sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- [EMAIL PROTECTED]'s password: XXXX
<--- got a packet, length=5, type=2(VERSION), id=0
---- protocol version set to 3
---> sending a packet, length=10, type=16(REALPATH), id=1
<--- got a packet, length=23, type=104(NAME), id=1
---- home set to /
---> sending a packet, length=16, type=17(STAT), id=2
---> sending a packet, length=18, type=17(STAT), id=3
<--- got a packet, length=21, type=105(ATTRS), id=2
<--- got a packet, length=21, type=105(ATTRS), id=3
cd ok, cwd=/place
lftp [EMAIL PROTECTED]:/place> put testfile.tls.16K.txt
---- path on wire is `/place/testfile.tls.16K.txt'
---> sending a packet, length=45, type=3(OPEN), id=4
<--- got a packet, length=10, type=102(HANDLE), id=4
---- got file handle 31 (1)
---> sending a packet, length=22, type=10(FSETSTAT), id=5
---> sending a packet, length=16406, type=6(WRITE), id=6
---> sending a packet, length=22, type=10(FSETSTAT), id=7
---> sending a packet, length=10, type=4(CLOSE), id=8
<--- got a packet, length=33, type=101(STATUS), id=5
<--- got a packet, length=21, type=101(STATUS), id=6
<--- got a packet, length=21, type=101(STATUS), id=7
<--- got a packet, length=21, type=101(STATUS), id=8
16384 bytes transferred
Trying the 64KB file size and failing:
./lftp sftp://that_host.there.com
lftp that_host.there.com:~> user that_user that_pswd
lftp [EMAIL PROTECTED]:~> debug 9
lftp [EMAIL PROTECTED]:~> cd place
---- Running connect program (ssh -a -x -s -l that_user
that_host.there.com sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- [EMAIL PROTECTED]'s password: XXXX
<--- got a packet, length=5, type=2(VERSION), id=0
---- protocol version set to 3
---> sending a packet, length=10, type=16(REALPATH), id=1
<--- got a packet, length=23, type=104(NAME), id=1
---- home set to /
---> sending a packet, length=16, type=17(STAT), id=2
---> sending a packet, length=18, type=17(STAT), id=3
<--- got a packet, length=21, type=105(ATTRS), id=2
<--- got a packet, length=21, type=105(ATTRS), id=3
cd ok, cwd=/place
lftp [EMAIL PROTECTED]:/place> put testfile.tls.65K.txt
---- path on wire is `/place/testfile.tls.65K.txt'
---> sending a packet, length=45, type=3(OPEN), id=4
<--- got a packet, length=10, type=102(HANDLE), id=4
---- got file handle 31 (1)
---> sending a packet, length=22, type=10(FSETSTAT), id=5
---> sending a packet, length=65558, type=6(WRITE), id=6
---> sending a packet, length=22, type=10(FSETSTAT), id=7
---> sending a packet, length=10, type=4(CLOSE), id=8
<--- got a packet, length=33, type=101(STATUS), id=5
---- Disconnecting
---- Running connect program (ssh -a -x -s -l that_user
that_host.there.com sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- [EMAIL PROTECTED]'s password: XXXX
<--- got a packet, length=5, type=2(VERSION), id=0
---- protocol version set to 3
---> sending a packet, length=37, type=17(STAT), id=1
<--- got a packet, length=29, type=105(ATTRS), id=1
---- path on wire is `/place/testfile.tls.65K.txt'
---> sending a packet, length=45, type=3(OPEN), id=2
copy: put rolled back to 0, seeking get accordingly
<--- got a packet, length=10, type=102(HANDLE), id=2
---- got file handle 31 (1)
---> sending a packet, length=22, type=10(FSETSTAT), id=3
---> sending a packet, length=65558, type=6(WRITE), id=4
---> sending a packet, length=22, type=10(FSETSTAT), id=5
---> sending a packet, length=10, type=4(CLOSE), id=6
<--- got a packet, length=33, type=101(STATUS), id=3
---- Disconnecting
I grabbed the latest 3.5.12 and recompiled from my notes, using
./configure --with-openssl
Here are the traces from the 64KB failure:
lftp [EMAIL PROTECTED]:/place> put testfile.tls.65K.txt
---- Running connect program (ssh -a -x -s -l that_user
that_host.there.com sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- [EMAIL PROTECTED]'s password: XXXX
<--- got a packet, length=5, type=2(VERSION), id=0
---- protocol version set to 3
---- path on wire is `/place/testfile.tls.65K.txt'
---> sending a packet, length=45, type=3(OPEN), id=1
<--- got a packet, length=10, type=102(HANDLE), id=1
---- got file handle 31 (1)
---> sending a packet, length=22, type=10(FSETSTAT), id=2
---> sending a packet, length=65558, type=6(WRITE), id=3
---> sending a packet, length=22, type=10(FSETSTAT), id=4
---> sending a packet, length=10, type=4(CLOSE), id=5
<--- got a packet, length=33, type=101(STATUS), id=2
---- Disconnecting
Interrupt
I think I can keep using plain ftp:// for the moment, but if you have
any ideas how to get sftp:// working that would be
wonderful. Otherwise I'll have to simulate using (ugh!) Bash scripts
and the sftp utility. :(
I've used lftp for three or four other solutions - now people think I
can do anything! I know who actually makes it possible.... Thank you.
Tom