From owner-freebsd-stable@FreeBSD.ORG Mon Oct 9 08:00:47 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B61FB16A541 for ; Mon, 9 Oct 2006 08:00:47 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out-01.forthnet.gr (mx-out.forthnet.gr [193.92.150.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7B0C43D46 for ; Mon, 9 Oct 2006 08:00:46 +0000 (GMT) (envelope-from dds@aueb.gr) Received: from mx-av-03.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-01.forthnet.gr (8.13.7/8.13.7) with ESMTP id k9980iEE011491; Mon, 9 Oct 2006 11:00:44 +0300 Received: from mx-in-01.forthnet.gr (mx-in-01.forthnet.gr [193.92.150.23]) by mx-av-03.forthnet.gr (8.13.7/8.13.7) with ESMTP id k9980g4M023764; Mon, 9 Oct 2006 11:00:42 +0300 Received: from [192.168.136.16] (ppp162-101.adsl.forthnet.gr [194.219.45.101]) by mx-in-01.forthnet.gr (8.13.7/8.13.7) with ESMTP id k9980fVk019313; Mon, 9 Oct 2006 11:00:42 +0300 Authentication-Results: mx-in-01.forthnet.gr from=dds@aueb.gr; sender-id=neutral; spf=neutral Message-ID: <452A01AD.4030500@aueb.gr> Date: Mon, 09 Oct 2006 11:00:45 +0300 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060729 SeaMonkey/1.0.4 MIME-Version: 1.0 To: Hans Lambermont References: <200610081454.k98Eseas063823@lurza.secnetix.de> <4529612C.8000908@aueb.gr> <20061009072838.GG48167@leia.lambermont.dyndns.org> In-Reply-To: <20061009072838.GG48167@leia.lambermont.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@FreeBSD.ORG Subject: Re: scp -c none (was Re: NFS client slow on amd64 6.2-PRERELEASE #2) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2006 08:00:47 -0000 Hans Lambermont wrote: > Diomidis Spinellis wrote: > >> You can also use ports/net/socketpipe. For example you can copy a >> directory with: >> >> socketpipe -b -i { tar cf - directory } -l { ssh remotehost } -r >> { tar xvf - } > > Just curious, what is the advantage of this approach to the following : > > tar cf - directory | ( ssh remotehost 'cd targetdir && tar xpf -' ) > > Something with buffering perhaps ? The advantage is a performance gain, especially on slower machines. You don't encrypt/decrypt the data, and you don't have other processes read/writing the data. However, because the data is not encrypted, and can therefore be read and modified on transfer, the approach is only suitable for closed, secure networks. With "tar cf - dir | ssh tar xf -" your data travels as follows: tar ssh sshd tar | ^ | ^ | ^ | | | | | | v | v | v | +------------+ +-------------+ |local kernel|---->|remote kernel| +------------+ +-------------+ With socketpipe, after the initial plumbing, which is performed using ssh, the data travels as follows: tar tar | ^ | | v | +------------+ +-------------+ |local kernel|---->|remote kernel| +------------+ +-------------+ The two tar processes directly write to and read from a network socket (hence the program's name). Diomidis - dds@ - http://www.spinellis.gr