Installing Linux OS with SSH on a Headless Computer: A Step-by-Step Guide
In this guide, we will walk you through the process of installing a Linux operating system on a headless computer using SSH. A headless computer is a system that does not have a monitor, keyboard, or mouse connected to it, making it ideal for server setups or remote access. By using SSH (Secure Shell), you can remotely connect to the headless computer and perform the installation process.
Prerequisites
Before we begin, make sure you have the following:
- A headless computer (physical or virtual) connected to the same network as your local computer.
- A Linux distribution ISO file. You can choose from popular options like Ubuntu, Fedora, or CentOS.
- An SSH client installed on your local computer. If you are using Windows, you can use PuTTY or Windows PowerShell. For macOS or Linux, you can use the built-in Terminal.
Step 1: Configuring BIOS/UEFI
If you are using a physical headless computer, you need to configure the BIOS/UEFI settings to enable remote access via SSH. Follow these steps:
- Power on the computer and press the appropriate key (usually Del, F2, or F10) to enter the BIOS/UEFI settings.
- Navigate to the "Boot" or "Advanced" section and enable the "Network Boot" or "PXE Boot" option.
- Save the changes and exit the BIOS/UEFI settings.
Step 2: Creating a Bootable USB Drive
Next, we need to create a bootable USB drive with the Linux distribution ISO file. Follow these steps:
- Download a tool like Rufus (for Windows) or Etcher (for macOS and Linux) to create a bootable USB drive.
- Insert a USB drive into your local computer.
- Open the Rufus or Etcher tool and select the Linux ISO file.
- Choose the USB drive as the destination and click "Start" to create the bootable USB drive.
Step 3: Connecting to the Headless Computer
Now, let's connect to the headless computer using SSH:
- Connect the bootable USB drive to the headless computer.
- Power on the headless computer and wait for it to boot from the USB drive.
- Once the Linux installer loads, note down the IP address assigned to the headless computer. You can usually find it in the network settings or by running the command
ip a. - Open the SSH client on your local computer.
- Enter the IP address of the headless computer as the hostname.
- Specify the username and password for the headless computer (these credentials may vary depending on the Linux distribution).
- Click "Connect" or press Enter to establish the SSH connection.
Step 4: Installing Linux OS
With the SSH connection established, we can now proceed with the Linux installation:
- Follow the on-screen instructions to select the language, keyboard layout, and other preferences.
- Choose the installation type. If you are unsure, the default option is usually suitable for most users.
- Select the destination drive where you want to install Linux. If there is an existing operating system, you may need to delete or resize partitions.
- Set up the username and password for the Linux system.
- Wait for the installation process to complete.
Step 5: Post-Installation Setup
After the installation, there are a few additional steps to ensure a smooth experience:
- Remove the bootable USB drive from the headless computer.
- Restart the headless computer.
- Wait for the system to boot up and display the login prompt.
- Connect to the headless computer using SSH, just like in Step 3.
- Update the system packages by running the command
sudo apt update(for Ubuntu-based distributions) orsudo dnf update(for Fedora-based distributions). - Install any additional software or packages you need using the respective package manager.
Congratulations! You have successfully installed a Linux operating system on your headless computer using SSH. You can now remotely manage and access your headless computer without the need for a monitor, keyboard, or mouse.
References
| Number | Source |
|---|---|
| 1 | Download Ubuntu |
| 2 | Download Fedora |
| 3 | Download CentOS |
| 4 | PuTTY SSH Client |
| 5 | Rufus |
| 6 | Etcher |