Introduction
Cockpit is a web-based interface that provides a simple and easy way to manage Linux servers. It allows you to start containers, administer storage, configure networks, and inspect logs. This guide will walk you through setting up SSH using a private key in Linux for Cockpit and installing Cockpit on Ubuntu.
Use Case
Cockpit is ideal for administrators who prefer a graphical interface for managing servers. It simplifies server management tasks and provides an overview of system performance and status.
How to Install Cockpit on Ubuntu 22.04 | 20.04 LTS
Installing Cockpit on Ubuntu is straightforward. Follow these steps:
- Update Package Index
sudo apt update
- Install Cockpit
sudo apt install cockpit -y
- Start and Enable Cockpit Service
sudo systemctl start cockpit cockpit.socket
sudo systemctl enable cockpit cockpit.socket
- Allow Cockpit Through UFW Firewall
sudo ufw allow 9090
- Access Cockpit Web Interface
Open your web browser and go to:
https://server-ip-address:9090
How to Install Cockpit on Ubuntu with Firewall
If you are using a different firewall setup, follow these steps to install Cockpit:
- Install EPEL Repository
sudo amazon-linux-extras install epel -y
- Update Packages
sudo yum update -y
- Install Cockpit
sudo yum install cockpit -y
- Start and Enable Cockpit Service
sudo systemctl start cockpit
sudo systemctl enable cockpit.socket
- Allow Cockpit Through Firewall
sudo firewall-cmd --add-service=cockpit --permanent
sudo firewall-cmd --reload
- Access Cockpit Web Interface
Open your web browser and go to:
https://your_server_ip_or_hostname:9090
Conclusion
Cockpit provides a powerful and user-friendly interface for managing your Linux servers. By setting up SSH with a private key, you enhance your server's security. Installing and configuring Cockpit on Ubuntu is simple, and with the firewall setup, you can ensure secure access to the Cockpit web interface. Happy server management!
This guide includes an introduction, use cases, detailed steps for setting up SSH with a private key, and installation instructions for Cockpit on Ubuntu with and without a firewall.