From owner-freebsd-questions@freebsd.org Thu Apr 25 16:34:15 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39D4B159C00F for ; Thu, 25 Apr 2019 16:34:15 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B3558DA9B for ; Thu, 25 Apr 2019 16:34:14 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=im93C0QpZRSWhdyUTxmAipAxguFsnVieUY93qhqsCM4=; b=K/QLwtrFa3mVA6hrQm8kN4PYpI efLdGD0JGEWRiFxp24ftsgF/9BOSJivRXdjBh5X6XVpuNTF6kTCcBzrrCqHGTrQyfPnwC4TgfksZ2 UNvHmbwlrYClzfjgZQon3HJEi32nSr/n5ZbUuNGn/OZV9wwKnW5InVpGT+3J+fUh0pn8=; Received: from vas by admin.sibptus.ru with local (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hJhK8-000Gif-Rk for freebsd-questions@freebsd.org; Thu, 25 Apr 2019 23:34:12 +0700 Date: Thu, 25 Apr 2019 23:34:12 +0700 From: Victor Sudakov To: freebsd-questions@freebsd.org Subject: Re: saving "zfs send" to a Windows host Message-ID: <20190425163412.GA63892@admin.sibptus.ru> References: <20190423054243.GA4659@admin.sibptus.ru> <201904230926.36122.dr.klepp@gmx.at> <20190425145210.GA62061@admin.sibptus.ru> <201904251728.15848.dr.klepp@gmx.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <201904251728.15848.dr.klepp@gmx.at> X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.11.4 (2019-03-13) Sender: Victor Sudakov X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Apr 2019 16:34:15 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dr. Nikolaus Klepp wrote: > > > Use sshd, just like you would in unix only environment. Install > > > OpenSSH on windows (e.g. > > > https://docs.microsoft.com/en-us/windows-server/administration/openss= h/openssh_install_firstuse > > > ), use public key authentication only without passphrase (yes, > > > security, I know, but you probably want the thing wirking first). I do > > > not know if the m$ sshd supports chroot, but if it does, use it.=20 > >=20 > > This is good advice, thank you. I've had OpenSSH installed by the > > Windows admin for me, so I can now ssh into that Windows host and even > > public key authentication works: > >=20 > > root@bsd:~ # ssh winhost ver > >=20 > > Microsoft Windows [Version 6.1.7601] > > root@bsd:~ #=20 > >=20 > > Now that I would like to send the backups to winhost to b:\my_backups\, > > what remote command should I call there? In Unix I would call "cat" or > > "dd" or even "rmt", but here? > >=20 > > root@bsd:~ # zfs send zroot/var/mail@test | ssh winhost "what?"=20 > >=20 > > I guess I need something in Windows that would accept a byte stream on > > stdin and save it to a file in b:\my_backups\ > >=20 > > Any thoughts? > >=20 >=20 > The "cat" of windows was/is "type" .. I think ... No, "type" does not seem to accept a byte stream from stdin, at least the way Unix "cat" or "dd" do: "echo test | type > q.txt" produces a syntax error, and=20 "echo test | type con > q.txt" waits forever, and when interrupted, it produces an empty q.txt --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcweGEAAoJEA2k8lmbXsY0pXMH/13vOOExwysxB3Qp1k1Vxhug ZpuwR/0oPOPJuEX60n0RJhWZVEF5QlmsQbjSatC7pHkZr3U0Rdn+AQIEfNFYOkeL RVMYzTvMCshUxFX9/k9PgnlgrhdUSvTQXj06m+D5syR202WbAIa8sM9VxK+mnuB5 ki+a7+FQeNjHYR0+WOXzbzbeAhoF44DUz1lfpzGmZ0zDAG0gR/c1JI5P5GSOpPjn GgyrFGirFjMN1FMqepHdt909sgq5romWrwJMX6RZRBASV469zPrL77ljzg4u4elS jhqDCRPVD1MSDtV+87FaLt4cCqdp7SEOog6yvDHOWTgQ3270rpdN8D96bSwyWFo= =8C7F -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc--