← Back to Garden
seedling

Thinkcentre: Static IP Configuration & SSH Setup (Arch Linux)

This document details the process of configuring a static IP address for the Thinkcentre running Arch Linux and troubleshooting its initial SSH access, with a focus on adapting the setup for a Wi-Fi (wlan0) connection.

The Goal

To establish reliable, passwordless SSH access to the Thinkcentre and assign it a permanent, predictable IP address within our homelab network (192.168.68.11).

Initial Troubleshooting: Enabling SSH Access

Upon initial attempts, SSH access to the Thinkcentre was not possible, indicating that the sshd (SSH daemon) service was either not installed or not running.

1. Confirm Internet Connectivity

(Performed locally on Thinkcentre's terminal)

ping -c 3 8.8.8.8
  • Result: Pings were successful, confirming the Thinkcentre had active internet connectivity.

2. Install and Enable OpenSSH

Arch Linux provides a minimal installation, so the OpenSSH server (sshd) is not installed by default.

  • Check installation:

pacman -Q openssh

    *   **Result:** `openssh` was not found.

*   **Install `openssh`:**
    ```bash
sudo pacman -S openssh

(Note: The system prompted for a password for sudo.)

  • Start and enable sshd service:

sudo systemctl enable --now sshd

    This command starts the SSH server immediately (`--now`) and configures it to start automatically on every boot (`enable`).

*   **Verify status:**
    ```bash
systemctl status sshd

* Result: The service showed active (running).

3. Test SSH Access

After sshd was confirmed running, SSH access from the Mac Mini was tested:

ssh ashish@192.168.68.59
  • Result: Successful connection, prompted for password.

Static IP Configuration (for Wi-Fi / wlan0)

With SSH access established, the next step was to set the static IP. Due to hardware limitations (waiting for Ethernet cables), this was configured for the Wi-Fi interface (wlan0).

1. Identify Network Manager

Arch Linux commonly uses NetworkManager for network configuration, which was confirmed as active.

systemctl status NetworkManager
  • Result: NetworkManager.service was active (running).

2. Find Wi-Fi Connection Name

The name of the active Wi-Fi connection (SSID) is needed for nmcli.

nmcli con show
  • Result: Identified the relevant Wi-Fi connection name (e.g., "MyHomeWifi").

3. Apply Static IP Configuration

The nmcli command was used to modify the Wi-Fi connection to use a static IP, gateway, and DNS server.

nmcli con mod "MyHomeWifi" \
  ipv4.addresses 192.168.68.11/24 \
  ipv4.gateway 192.168.68.1 \
  ipv4.dns 192.168.68.58 \
  ipv4.method manual
  • "MyHomeWifi": Replaced with the actual Wi-Fi connection name.
  • ipv4.addresses 192.168.68.11/24: Assigns the static IP 192.168.68.11.
  • ipv4.gateway 192.168.68.1: Sets the router as the gateway.
  • ipv4.dns 192.168.68.58: Points to the Raspberry Pi (Pi-hole) for DNS.
  • ipv4.method manual: Specifies manual IP configuration.

4. Apply Changes and Verify

The changes were applied by bringing the connection up, which caused the SSH session to disconnect.

nmcli con up "MyHomeWifi"

After a brief wait, SSH access was verified at the new static IP:

ssh ashish@192.168.68.11
  • Result: Successful passwordless SSH connection to 192.168.68.11.

Next Steps

The Thinkcentre is now accessible via passwordless SSH at its static IP 192.168.68.11. This makes it ready for software installation.

Important Note: This static IP is currently configured on the wlan0 (Wi-Fi) interface. For long-term stability and performance, the plan is to switch to a wired Ethernet connection (eth0) once the necessary hardware is available. This will involve re-applying a similar static IP configuration, but targeting eth0.