Re: How to connect ssh and /dev/nmdm devices Was:( Re: Native Linux guest in Bhyve (no grub2-bhyve) status? )

2015-01-20 Thread John-Mark Gurney
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/nmdmA.
 
 This will give easy access to the console screens.
 
 one would type:
   ssh -p  user@management-ip
 and end up at the console on /dev/nmdmA
 
 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.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: How to connect ssh and /dev/nmdm devices Was:( Re: Native Linux guest in Bhyve (no grub2-bhyve) status? )

2015-01-20 Thread Paul Vixie


 Willem Jan Withagen mailto:w...@digiware.nl
 Tuesday, January 20, 2015 8:37 AM



 What is the easiest way to propagate  the full-duplex tty stream
 from a SSH-login to a /dev/nmdmA.

somewhat expectedly, i use http://www.freshports.org/sysutils/rtty/
for this. with a restricted shell, i can offer console access to guests
via ssh. cu also works, but lacks rtty's background logging.


-- 
Paul Vixie
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org