(
Jump to the original submission)
Sat 31 May 2008 08:30:35 PM UTC, comment #7:
I would rather suggest you base SFTP code on an existing library, such as the libssh2.
Or possibly even consider switching entirely to libcurl (which already supports SFTP based on libssh2)...
(Yeah, as libcurl author and libssh2 project contributor I'm very biased to both the above libs)
|
Sat 31 May 2008 07:39:42 PM UTC, comment #6:
[rakesh@rocky sftp]# ./a.out rakesh@192.168.10.2 /home/rakesh/Desktop/new/Fedora-9-i386-DVD/Fedora-9-i386-DVD.iso
rakesh@192.168.10.2's password:
write: nread(4096) != nwrite(4294967295)
write: nread(4096) != nwrite(4294967295)
write: nread(4096) != nwrite(4294967295)
write: nread(4096) != nwrite(4294967295)
write: nread(4096) != nwrite(4294967295)
write: nread(4096) != nwrite(4294967295)
It breaks after 1.3 GB copied
Total size 3.4 GB
|
Sat 31 May 2008 05:42:10 AM UTC, comment #5:
That sounds reasonable. Till then I will focus on hardening my prototype into something more mature.
|
Fri 30 May 2008 06:48:17 PM UTC, comment #4:
FYI, Debarshi,
I suspect that you'll find your chief difficulty to be actually rolling the code into Wget itself, whose code isn't currently flexible enough to make such a change easily.
In particular, the http_loop and ftp_loop functions, both of which are responsible to retry the download until it succeeds (or fails hard), share a lot of logic, and need to be refactored (something I'm hoping to tackle soon). Rather than roll yet another sftp_loop function, it'll probably be a little easier to wait until I can refactor it into a single url_loop function.
|
Fri 30 May 2008 05:29:22 PM UTC, comment #3:
I just tested in my LAN first :
[rpmbuild@rocky sftp]$ ./a.out rakesh@192.168.10.2 /home/rakesh/Desktop/new/Fedora-9-i386-DVD/Fedora-9-i386-DVD.iso
rakesh@192.168.10.2's password:
SSH_FXP_READ: wrong request id (0) != 3
[rpmbuild@rocky sftp]$
Am I using the arguments correctly as expected?
|
Fri 30 May 2008 02:53:46 PM UTC, comment #2:
I have a simple non-interactive SFTP downloader ready now. Even though it is not the latest, I followed draft-ietf-secsh-filexfer-02, which describes version 3 of the protocol, because that is what openssh-5.0p1 and GNOME's Gvfs are also implementing.
To use the prototype:
$ tar -xzf sftp.tar.gz
$ cd sftp
$ gcc sftp.c buffer.c utility.c
$ ./a.out <hostname> <remotefilepath>
$
(file #15769)
|
Wed 28 May 2008 08:32:32 PM UTC, comment #1:
rishi from IRC [(n=rishi@gnu-india/supporter/debarshi): Debarshi Ray] has been working on something for this.
|
Tue 03 Jul 2007 07:40:33 AM UTC, original submission:
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
Depends on the following items: None found
Items that depend on this one: None found
Follow 5 latest changes.