From owner-freebsd-virtualization@FreeBSD.ORG Tue Jan 20 19:00:46 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F024A507; Tue, 20 Jan 2015 19:00:45 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C624ABAF; Tue, 20 Jan 2015 19:00:45 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t0KJ0dWu061948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 11:00:39 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t0KJ0cUL061946; Tue, 20 Jan 2015 11:00:38 -0800 (PST) (envelope-from jmg) Date: Tue, 20 Jan 2015 11:00:38 -0800 From: John-Mark Gurney To: Willem Jan Withagen Subject: Re: How to connect ssh and /dev/nmdm devices Was:( Re: Native Linux guest in Bhyve (no grub2-bhyve) status? ) Message-ID: <20150120190038.GR1949@funkthat.com> References: <5448305F.8010307@freebsd.org> <54483712.8050007@freebsd.org> <54A9CAFB.1090902@digiware.nl> <54A9CC90.2020103@freebsd.org> <54AA4E32.1080303@digiware.nl> <54BE8434.3070901@digiware.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BE8434.3070901@digiware.nl> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Tue, 20 Jan 2015 11:00:39 -0800 (PST) Cc: "freebsd-virtualization@freebsd.org" , Conrad Rad X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 19:00:46 -0000 Willem Jan Withagen wrote this message on Tue, Jan 20, 2015 at 17:37 +0100: > On 2015-01-05 9:41, Willem Jan Withagen wrote: > > On 2015-01-05 0:28, Peter Grehan wrote: > >> Hi Willem, > >> > >>> Would it it be possible in the meantime to enhance grub2-bhyve with the > >>> same possibility as bhyve itself has for the console? > >>> > >>> So I can redirect grub screen access to /dev/nmdm12041, and one can even > >>> use this channel to see the grubscreen during rebooting. > >>> > >>> Or if it is not that hard, give some pointers to write it myself. > >> > >> Conrad contributed this to grub-bhyve with > >> https://github.com/grehan-freebsd/grub2-bhyve/pull/2 > >> > >> It's available in v0.30 which has been in ports for a while now: > >> > >> https://github.com/grehan-freebsd/grub2-bhyve/releases/tag/v0.30 > > > > Right, > > > > Did miss that, I guess. > > I'll upgrade my bhyve-grub. > > Yup, works really nice. > > Now in a continuance from this... > > What is the easiest way to "propagate" the full-duplex tty stream from > a SSH-login to a /dev/nmdmXXXXA. > > This will give easy access to the console screens. > > one would type: > ssh -p XXXX user@management-ip > and end up at the console on /dev/nmdmxxxxA > > Currently I'm using tip for this, but that also requires hacking new VMs > into /etc/remote. > > So a very basic TIP, without the serial/ACU/speed stuff, would really be > useful. Preferably all signals are sent thru as well. > And if this might not be 100% secure, it would require an ssh-jailed > setup. A bit like sftp. > > hints and or suggestion welcome. If you want this, look at RFC2217 compatible programs... RFC2217 extends telnet to provide changing things like baud rates and parity inline... The Python module PySerial includes both a client: http://pyserial.sourceforge.net/examples.html#miniterm and a server: http://pyserial.sourceforge.net/examples.html#single-port-tcp-ip-serial-bridge-rfc-2217 Looks like ports has sredird that does the same for a server... So, you could use a server attached the nmdm plus ssh port tunneling to provide access... I've been tempted to write a program using cuse that would present a modem device that could be used w/ tip or cu and connect to an RFC2217 server on the back end giving you complete remove access to all settings of the serial port, but haven't gotten around to doing that yet... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."