Linux Server Basics: From Installation to Basic Configuration

Linux servers are the preferred choice for servers due to their stability, security, open-source nature, and ease of customization. Before installation, download the Ubuntu Server or CentOS Stream image, create a bootable USB using Rufus or dd, and boot from the USB drive at startup. During installation, select the language and time zone; for beginners, automatic partitioning is recommended. Set up a regular user and check the option to install OpenSSH. After installation, restart and log in. For basic configuration, set a static IP (using Netplan for Ubuntu and NetworkManager for CentOS), manage software with apt/yum/dnf, create a regular user, and disable direct root login. Use ufw on Ubuntu and firewalld on CentOS to enable the firewall. Subsequent learning topics include web server, database, and Docker deployment, with practice being key.

Read More
SSH Service Configuration: A Detailed Explanation of Linux Remote Connection

SSH is a secure remote login protocol that encrypts data transmission, used for remote management of Linux servers (such as cloud servers and local servers), replacing insecure protocols like Telnet. Key configuration steps: Install `sshd` on the server (using `apt` for Debian/Ubuntu, `yum` for CentOS/RHEL), start it and set it to boot automatically (`systemctl start/ enable sshd`). Modify `/etc/ssh/sshd_config` (backup first). Critical configurations: Change the port (e.g., 22→2222 to prevent brute-force attacks), disable root login (`PermitRootLogin no`), allow specific users (`AllowUsers`), and disable password login in favor of key-based authentication (generate a key pair locally and use `ssh-copy-id` to transfer it to the server). Restart `sshd` after changes. Client connection: Use PuTTY on Windows, and the terminal on Linux/macOS with the command `ssh username@IP -p port`; key-based authentication is more secure. Security notes: Allow the port through the firewall (UFW or cloud security groups), disable direct root login, and regularly update the system and SSH. Common issues: Timeout (check IP/network), connection refused (check port/service), permission errors (

Read More