wiki:add_serial_access_to_console_server

Adding a new user/server to the console server

After setting up a new server, you may want to enable serial access to that server via our serial server (console.mayfirst.org).

Make sure you know what device you've connected to (e.g. /dev/ttyS27) and what the name of the new server is.

The commands to run are:

export SERVERNAME=<put server name here!>
adduser --disabled-password --gecos="$SERVERNAME console user,,," "${SERVERNAME}-console"
cereal-admin create "$SERVERNAME" "/dev/$TTYDEVICE" 115200 "${SERVERNAME}-console" "${SERVERNAME}-console"
cereal-admin start "$SERVERNAME"

If you want MF/PL root staff to have access to the new console, you can just copy ssh authorizations from root on the console server:

cat /root/.ssh/authorized_keys >> /home/${SERVERNAME}-console/.ssh/authorized_keys"

Here's an example run (in the example below SERVERNAME=zinn, and TTYDEVICE=ttyS14):

0 sylvia:~# adduser --disabled-password --gecos='zinn console user,,,' zinn-console
Adding user `zinn-console' ...
Adding new group `zinn-console' (1014) ...
Adding new user `zinn-console' (1014) with group `zinn-console' ...
Creating home directory `/home/zinn-console' ...
Copying files from `/etc/skel' ...
0 sylvia:~# cereal-admin create zinn /dev/ttyS14 115200 zinn-console zinn-console
Created session 'zinn':
--f zinn /dev/ttyS14 115200 zinn-console zinn-console
0 sylvia:~# cereal-admin start zinn
Started session 'zinn'.
0 sylvia:~# cat .ssh/authorized_keys >> ~zinn-console/.ssh/authorized_keys 
0 sylvia:~# 
Last modified 8 years ago Last modified on Nov 26, 2010, 2:20:31 PM