Transferring file via SSH

From: AT (atchumel_at_hotmail.com)
Date: 06/12/03


Date: 12 Jun 2003 10:31:45 -0700

People, HI!
Help me please!

Basic data and sequence of operations:
1. Have SSH client with program interface (can call get and send
methods).
2. Connect to the AIX/Solaris/HP-UX (standard SSH Server).
3. Send next commands:
stty -echo
cat >file1 2>/dev/null
... here I open file on the client machine, read buffers (or) strings
and send them to the server
" pSSHControl->send(pBuff);"
... when reach end of the file I send
\x04\x04
stty echo
... and close connection.
THE PROBLEM: the transferred file on the server is corrupted - some
packets what I sent from client are missed. SSH client sends packets
right (checked by tracing).
Single known solution at this moment - send small bits (packets with
small size or single source file line) and wait (call sleep ~ 1...1000
ms) after every bit sending. But in this case the sending time is very
long...
Seems that SSH Server or tty, cat.. , don't know who well on the
server side, can't process incoming packages so quickly as client
sends and loses them.
May be anybody have any idea about this issue?
May be somebody had similar problem.
In other words - welcome any suggestion!
Thanks.



Relevant Pages

  • Re: Diagnose co-location networking problem
    ... it was from the client. ... Actually there's significant indication of lost packets and clues that ... 540 retransmit timeouts ... are you using any packetfiltering on the server? ...
    (freebsd-net)
  • Re: process stuck in nfsfsync state
    ... >> server is wedged, not the client. ... Comparing the client and server traces, it looks like fragments in the ... loss for individual packets adds up. ...
    (freebsd-stable)
  • Re: TDS vs. TCP
    ... I start capturing the network traffic between SQL ... Server and the client. ... I don't see any TDS packets but the communication between SQL ... stand-a-lone server and the client, ...
    (microsoft.public.sqlserver.clustering)
  • Re: DHCP
    ... DHCPINFORM is used only if the client has ... >>> I would run ethereal on the server and catch all the packets exchanged ... >>> between the client and server. ... > implies that the host has a "working" IP address. ...
    (comp.os.linux.networking)
  • Re: "Listen on" semantics
    ... the worst thing may well be a screwed-up clock (and ... of packets that were crafted on purpose by malicious minds. ... server then you have a bigger problem since ntpd is not designed to work ... What I want is not so much two copies of ntpd as a separation between client and server functionality. ...
    (comp.protocols.time.ntp)