Install the cockpit service on your Linux server and administer it from any PC on your network.

Posted: April 24, 2017. At: 1:07 PM. This was 10 months ago. Post ID: 10552
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

The cockpit service for Linux enables remote administration of a Linux PC from a client machine running any web browser.

Installing this on Linux Mint is very easy. I am using Linux Mint 18.1

Firstly, run this command to install the PPA.

jason@jason-virtual-machine ~ $ sudo add-apt-repository ppa:cockpit-project/cockpit

Then update the package repositories.

jason@jason-virtual-machine ~ $ sudo apt update

And then Cockpit may be installed.

jason@jason-virtual-machine ~ $ sudo apt install cockpit

Now start the cockpit service.

jason@jason-virtual-machine ~ $ sudo systemctl enable --now cockpit.socket

The cockpit service will not be running on the server machine.

I can verify this, using this command.

jason@jason-virtual-machine ~ $ ps -ef | grep cockpit
cockpit+   3348      1  0 12:34 ?        00:00:00 /usr/lib/cockpit/cockpit-ws
root       3362   3348  0 12:34 ?        00:00:00 /usr/lib/cockpit/cockpit-session localhost
jason      3369   3362  0 12:34 ?        00:00:00 cockpit-bridge
jason      3652   1835  0 12:40 pts/0    00:00:00 grep --color=auto cockpit

Now take note of the IP address of the server machine and we can connect on a client using a web browser.

Cockpit login screen.
Cockpit login screen.

And we will be presented with this initial screen that shows some information about our Linux Server.

Cockpit initial info screen.
Cockpit initial info screen.

This screen shows information about our machine and allows us to reboot the server from here. Upon scrolling down, there are graphs that show CPU, memory, Disk I/O and network traffic. The Logs option allows viewing of system logfiles.

The Accounts option allows modification and creation of system user accounts.

The Services option allows viewing a list of running services on the system. Clicking a service brings us to a screen that allows disabling Linux services, or starting and stopping them.

The terminal option features an embedded terminal for executing terminal commands as the user you logged in as.

Cockpit embedded terminal window.
Cockpit embedded terminal window.

It is also possible to customize the account settings, by clicking your name in the top right of the page.

Cockpit account settings.
Cockpit account settings.

The Cockpit service is perfect for a machine that might be in another room. This allows control over it using another machine on your network, that is running any operating system. Truly a very good product for a Linux user who likes remote web based administration of a server. Just make sure that a good strong password is used for the Linux machine. Since it is accessible over the whole network, maybe there are security considerations. This is why a strong account password would be needed. But it is easy to install and get running, so why not try it out? Cockpit does force HTTPS though, so snooping the web traffic to get the password would not be very successful. The user does need to accept a self-signed cert to get access to the admin login panel. Here is more information about the cockpit security setup:

It is also possible to add Authorized SSH keys to your account, this would further increase security.

Cockpit account settings. You can add SSH keys.
Cockpit account settings. You can add SSH keys.

So, this is a very secure way to access your server after all. It is possible to change the hostname on the initial screen to a prettier version, but this requires elevated account privileges.

No comments have been made. Use this form to start the conversation :)

Leave a Reply