Install most basic Debian Jessie container for use as a template for LXC or similar

To create a most basic Debian Jessie container, you can follow these steps:

You should not forget to set the root password as it is good to have a known value later.

Now that we are within the container, we can configure the most basic settings that we will need for all containers:

Here I am usually generating

and set the default to en_US.UTF-8 .

To get the full repository contents, you should change your repository sources to look as below:

and then do an aptitude update .

You should also install an SSH server by entering

Enable root logins via SSH by changing one line in its configuration:

Unfortunately systemd is not yet working easily with LXC, so it should be replaced by the old sysvinit:

Edit initial DNS resolver configuration so it looks like this:

Then also configure the main network interface configuration:

Replace /etc/inittab with the following short version which is enough for a container:

Should the network not come up automatically, you can set the IP address in the config file of the container:

After a first start, you should also configure the mail server so it can send all system mail to your main mail server:

and answer all the questions.

Shut the machine down again, cleanup all the log files and make a copy which you can then use as your template for further containers.

Remotely disabling Firewall of Mac OS X

I just happened to be unable to log in to my Mac using ScreenSharing (VNC). It is enabled, but probably the firewall is asking if ScreenSharing should be allowed to receive incoming connections… Bummer!

If at least SSH is working, it is possible to disable the firewall completely from the command line. Please be sure to only do this in a secured environment:

After this you will have to restart the firewall agent:

You should now be able to use ScreenSharing.

Do not forget to re-enable the firewall again after you have finished your work, same procedure, but with 1 instead of 0, of course 🙂

To enable ScreenSharing in general, please read this older post: Activate screen sharing on Mac OS X when you only have SSH enabled