lxc container setup

I prefer to purge openssh-server and then reinstall it as the default config requires preshared keys for all users which isn't really something I desire and it's simpler to just trash the default configs for containers and reinstall openssh-server from scratch.

If you get this error

sudo: no tty present and no askpass program specified

You can create a file like this

echo "import pty; pty.spawn('/bin/bash')" > /tmp/pty_spawn.py

And then run

python /tmp/pty_spawn.py

to switch to a terminal type where users can elevate privilege. Note that this is only a problem if you got into the container using lxc exec --

No Comments
Back to top