At the moment it is a "empty" jail, just the base system is up and running and nothing else.
First step for me is to be able to manage this "jail" as if it was another server, so usually to start would be a way to connect to it via ssh, and from that point will be used in a way like any other FreeBSD installation.
But going back to the jail that is running, then in the host system you can issue the command jls and it will output the current running jails like below in my case:
#jls
JID IP Address Hostname Path
2 192.168.1.6 home.mufley.com /usr/local/jails/containers/jail
#
At the moment as mentioned, it is an "empty" system in the jail, just with the base FreeBSD installation.
My first objective is to be able to connect to it via ssh, and for that i need to enable ssh on it, but also i will need a user that allows me to connect and then from that user sudo into root where needed to configure, admin or manage software.
So for this we will need to get into the jail, and as root in the host system you are able to use the command jexec to enter the jail, amongst one of the many things you can do with jexec.
While it is stated in the handbook that the jails should be managed directly from the host system, i will prefer to manage it as if it was a separate server. So from the handbook, you can issue the command:
root@host:/root # jexec -u root jailname
root@jail:/ #
And that will "log" you into the jail as the root user.
As stated it is empty, just the base system, and i will want to do the same thing as in my other servers, which is to start with the installation of the openssh port, and the creation of a user that will be used to connect, and then to sudo into root.
I will start with the creation of a user and making sure that this user is added to the wheel group so he can su to root.
Then the next step will be to get/download the ports collection into the jail so i can install the openssh from the ports.
And with openssh installed and configured to start, and starting, i was able to ssh into the jail, via the configured/assigned ip address on the jail configuration.
Et voila, it worked with the basic settings and initially for the moment i am using password authentication just to keep things simple, and focus more on the managing the jail and understand how it works..
In the end my aim is to have a jail running a backup to my external email server, allowing to receive emails and to connect to it via IMAPS, but also having the possibility of sending email via SMTPS.
The basis for this email backup server will be using Postfix to handle the incoming and outgoing email, and Courier IMAP for allowing IMAP clients to connect in a secure way.