This is a very simple SSH server for allowing users to easily participate in an interactive demo. It allows logging in with arbitrary usernames, creating a new user on-the-fly and giving the user a shell for it. A shared password among all users is used for authentication.
Enable the NixOS module with
{
imports = [
./path/to/ssh-participation/module.nix
];
services.ssh-participation.enable = true;
}
Then ssh to the server:
$ ssh demo.example.com
The authenticity of host 'demo.example.com (172.18.67.126)' can't be established.
RSA key fingerprint is SHA256:iYtE6QJoExY7GdF/dzWv9xlsekurZlZ49Yjo9xiUuu8.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'demo.example.com' (RSA) to the list of known hosts.
(alice@example.com) Enter password: pajamas mutual aspire amused
[alice@example.com:~]$
Both the password and the host key are autogenerated the first time it runs and are available in /var/lib/bouncer/id_rsa*
and /var/lib/bouncer/password
respectively.
Users that logged in in this way are part of the participants
group and have their home directory in /home/participants/$USER
.
make