From owner-freebsd-questions Mon Sep 28 21:32:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA06613 for freebsd-questions-outgoing; Mon, 28 Sep 1998 21:32:33 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA06606 for ; Mon, 28 Sep 1998 21:32:29 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id OAA11328; Tue, 29 Sep 1998 14:01:16 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id OAA11555; Tue, 29 Sep 1998 14:00:59 +0930 (CST) Message-ID: <19980929140059.K15172@freebie.lemis.com> Date: Tue, 29 Sep 1998 14:00:59 +0930 From: Greg Lehey To: "Chuck O'Donnell" , questions@FreeBSD.ORG Subject: Re: short writes in redirects and pipes with ssh-1.2 ? References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from Chuck O'Donnell on Mon, Sep 28, 1998 at 06:11:55PM -0400 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 28 September 1998 at 18:11:55 -0400, Chuck O'Donnell wrote: > > I am having trouble with ssh-1.2 as built from the ports tree. ssh > seems to truncate files in a certain size range whenever you use it to > transfer data using a pipe or a redirect. Here is a way to repeat it > on my machine (both machines are running 2.2.6), with a comparison to > the same command using rsh: > > --- > localhost$ rsh remote_host dd count=61 if=/dev/zero | wc -c > 61+0 records in > 61+0 records out > 31232 bytes transferred in 2.557135 secs (12214 bytes/sec) > 31232 > localhost$ ssh remote_host dd count=61 if=/dev/zero | wc -c > 30720 > localhost$ > --- > > Note how the statistics report that is normally written by dd to > stderr is missing too. If you drop the count by one, you will get a > good write, but the statistics report is still missing. Drop it by > one more to 59, and everything works fine. Strange. Sometimes things work OK for me, sometimes they don't: === grog@freebie (/dev/ttypb) ~ 3 -> ssh freefall.freebsd.org dd count=61 if=/dev/zero | wc -c 61+0 records in 61+0 records out 31232 bytes transferred in 0.007494 secs (4167616 bytes/sec) 31232 === grog@freebie (/dev/ttypb) ~ 5 -> ssh -V SSH Version 1.2.25 [i386-unknown-freebsd3.0], protocol version 1.5. Standard version. Does not use RSAREF. === grog@freebie (/dev/ttypb) ~ 6 -> ssh freefall.freebsd.org dd count=61 if=/dev/zero | wc -c 30720 You have new mail in /var/mail/grog === grog@freebie (/dev/ttypb) ~ 7 -> ssh freefall.freebsd.org dd count=61 if=/dev/zero | wc -c 30720 === grog@freebie (/dev/ttypb) ~ 8 -> > Any thoughts? I'd guess that it's a timing problem. Maybe the secure channel goes away before the final data (including the dd summary) gets across. I'd recommend a bug report. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message