Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 1998 14:00:59 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "Chuck O'Donnell" <cao@bus.net>, questions@FreeBSD.ORG
Subject:   Re: short writes in redirects and pipes with ssh-1.2 ?
Message-ID:  <19980929140059.K15172@freebie.lemis.com>
In-Reply-To: <Pine.BSF.3.96.980928175607.280A-100000@milf18.bus.net>; from Chuck O'Donnell on Mon, Sep 28, 1998 at 06:11:55PM -0400
References:  <Pine.BSF.3.96.980928175607.280A-100000@milf18.bus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980929140059.K15172>