Accessing an LXC container
There are several ways in which we can access an LXC container:
- The noVNC console
- SSH
- Direct shell through the CLI
The noVNC console
We can access and view the container directly from the GUI using the noVNC console. It is almost visual remote access to the instance. The console is identical to a KVM virtual machine. If we try to access the container using the console after a long period of inactivity, it may appear as just a cursor and no login option:
By simply pressing the Enter key, we can make the login prompt appear, as shown in the following screenshot:
Direct shell through the CLI
One of the best features of an LXC container is the ability to directly access the container shell through the CLI of the host node. The Proxmox command to access the LXC container shell is as follows:
# pct enter <ct_id>
This gives us the direct shell prompt of the container, as shown in the following screenshot:
In the previous example, we are accessing the LXC container ubuntu-01...