Using Cereal for simple serial console access
---------------------------------------------

Here is a common way to set up cereal.

The assumption here is that the second serial port on one machine
(galago) is connected to the serial console of another host (douc).

## begin by creating on galago a group which can view the logs from douc, but
## can't necessarily attach to douc's serial console:
0 galago:~# addgroup doucviewers
Adding group `doucviewers' (GID 1001) ...
Done.

## create a separate user account who will control douc (and can attach):
0 galago:~# adduser --ingroup doucviewers --disabled-password --gecos 'douc console controller,,,' doucconsole
Adding user `doucconsole' ...
Adding new user `doucconsole' (1001) with group `doucviewers' ...
Creating home directory `/home/doucconsole' ...
Copying files from `/etc/skel' ...

## set up access for that user with ssh keys (here we just use the
## same keypairs that can already connect to root):
0 galago:~# cat ~/.ssh/authorized_keys >> ~doucconsole/.ssh/authorized_keys 

## set up the cereal session itself:
0 galago:~# cereal-admin create douc /dev/ttyS1 115200 doucconsole doucviewers
Created session 'douc'.
0 galago:~# cereal-admin list douc
--f douc /dev/ttyS1 115200 doucconsole doucviewers
0 galago:~# cereal-admin enable douc
Enabled session 'douc'.
0 galago:~# cereal-admin list douc
+-f douc /dev/ttyS1 115200 doucconsole doucviewers
0 galago:~# 

