Close Menu
  • Home
  • Life style
    • Beauty tips
    • Exercise & Training
    • Fashion
    • Healthline
  • Exploration
    • Celebrities
    • Business
    • Travel guides
    • Technology
  • Web tutorials
    • Hosting & Servers
    • Blogger guides
    • WordPress guides
  • English
    • Tiếng Việt
    • Hmong
    • English
Facebook YouTube X (Twitter) Instagram
Trending
  • Search Profile or Preferred Sources: Choose the Right Tool for Your Website
  • Set Up Brevo for WordPress: Verify Senders and Test SMTP Email
  • Samsung Galaxy S27 Ultra: 5,700mAh Battery, 60W Charging and Open Questions
  • How to Create a Better-Looking Blogger Comment Box with CSS
  • Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort
  • How to Check Whether Yandex Has Indexed an Article
  • Set Yandex Site Region and Check How Your Website Appears
  • What to Prepare Before Connecting a Website to Yandex Webmaster
Facebook YouTube X (Twitter) Instagram
SaibABCSaibABC
Chú thích cho quảng cáo
  • Home
  • Life style
    1. Beauty tips
    2. Exercise & Training
    3. Fashion
    4. Healthline
    5. View All

    Build a Simple Skincare Routine Without Buying Too Many Products

    30/08/2026

    How to choose mineral sunscreen that does not leave a white cast

    30/08/2026

    What Does PDRN in Cosmetics Do? How to Read Advertising

    30/08/2026

    Skincare While Losing Weight: Keep Skin More Hydrated, Healthy, and Firm

    30/08/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Five-Minute Office Exercises: A Snack-Sized Movement Schedule

    30/08/2026

    Strengthen Your Core with 12 Exercises from Beginner to Advanced

    30/08/2026

    Fashion Digital Product Passport: What Can You Read?

    30/08/2026

    Build a Minimalist Wardrobe in 2026: Buy Less, Wear Longer

    30/08/2026

    Winter Travel Fashion: Stylish Outfits for Men and Women

    22/12/2023

    Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort

    28/09/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Suunto Run Heart-Rate Tracking After an Update: Check Your Zones Before Running

    19/09/2026

    Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort

    28/09/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Suunto Run Heart-Rate Tracking After an Update: Check Your Zones Before Running

    19/09/2026
  • Exploration
    1. Celebrities
    2. Business
    3. Travel guides
    4. Technology
    Featured

    Samsung Galaxy S27 Ultra: 5,700mAh Battery, 60W Charging and Open Questions

    By Nuj Coom29/09/2026
    Recent

    Samsung Galaxy S27 Ultra: 5,700mAh Battery, 60W Charging and Open Questions

    29/09/2026

    Samsung Galaxy S26 Ultra Review: What Makes It Worth Buying—and What Doesn’t

    16/09/2026

    iPhone 18 Pro Max vs Galaxy S26 Ultra: Which One Should You Choose?

    16/09/2026
  • Web tutorials
    1. Hosting & Servers
    2. Blogger guides
    3. WordPress guides
    4. View All

    Let’s Encrypt on Vultr: Enable HTTPS and Automatic Renewal

    09/09/2026

    Install WordPress on Vultr Manually: From Ubuntu to HTTPS

    08/09/2026

    Point Your Domain to a Vultr VPS and Verify the DNS Connection

    08/09/2026

    Set Up an Ubuntu VPS on Vultr: From Account Creation to SSH

    07/09/2026

    How to Create a Better-Looking Blogger Comment Box with CSS

    28/09/2026

    A 90-Day Blog Growth Plan: Write, Measure, and Improve

    26/09/2026

    Blogspot Maintenance: Fix Broken Links, Images, and Slow Pages

    26/09/2026

    How Does Google Find a Blog? The 3 Key Stages Explained

    26/09/2026

    Set Up Brevo for WordPress: Verify Senders and Test SMTP Email

    29/09/2026

    How to Check Whether Yandex Has Indexed an Article

    26/09/2026

    Set Yandex Site Region and Check How Your Website Appears

    26/09/2026

    What to Prepare Before Connecting a Website to Yandex Webmaster

    26/09/2026

    Search Profile or Preferred Sources: Choose the Right Tool for Your Website

    14/10/2026

    Set Up Brevo for WordPress: Verify Senders and Test SMTP Email

    29/09/2026

    How to Create a Better-Looking Blogger Comment Box with CSS

    28/09/2026

    How to Check Whether Yandex Has Indexed an Article

    26/09/2026
  • English
    • Tiếng Việt
    • Hmong
    • English
SaibABCSaibABC
Home»Web tutorials»Hosting & Servers»Ubuntu Server 26.04: Initial Security Configuration Guide
Hosting & Servers 4 Mins ReadNo Comments

Ubuntu Server 26.04: Initial Security Configuration Guide

Nuj CoomBy Nuj CoomUpdated:02/09/2026
Facebook Twitter Pinterest LinkedIn Tumblr Email
Chú thích cho quảng cáo

Contents

  1. Introduction: Configuring Ubuntu Server
  2. Step 1 — Log in via SSH
  3. Step 2 — Create a new user
  4. Step 3 — Grant administrative privileges with sudo
  5. Step 4 — Configure the UFW firewall
  6. Step 5 — Enable SSH for regular users
  7. Conclusion: Ubuntu Server Configuration
  8. Reference source

Introduction: Configuring Ubuntu Server

After deploying a new Ubuntu server, prioritizing foundational configuration is essential for improving both security and manageability. The steps below apply to a newly installed Ubuntu Server system; Ubuntu documentation currently targets the latest LTS release, Ubuntu 26.04 LTS (according to ubuntu.com). If you are using Ubuntu 24.04 or 22.04 LTS, the basic command names in this guide remain similar.

Step 1 — Log in via SSH

You need to know the server’s public IP address and have the corresponding password or private key. Log in via SSH using the account created by the provider or installer:

ssh username@your_server_ip

SSH provides an encrypted remote control connection through OpenSSH (according to ubuntu.com).

Note about root: Ubuntu usually disables direct login with the root account by default. Instead of using root for everyday tasks, use a regular account and temporarily elevate privileges with sudo. This follows the principle of least privilege and makes administrative actions easier to audit (according to ubuntu.com).

Step 2 — Create a new user

If the system does not yet have a regular administrative account, replace sammy with the username you want to create:

Chú thích cho quảng cáo
sudo adduser sammy

Set a strong password. Additional information such as the full name or phone number can be left blank if not needed. On some cloud servers, the initial account is created during deployment, so you can skip this step.

Step 3 — Grant administrative privileges with sudo

Add the new user to the sudo group so they can run individual administrative commands when needed:

sudo usermod -aG sudo sammy

Log out and log back in for the session to recognize the new group. When administrative privileges are needed, place sudo before the command, for example:

sudo command_to_run

Ubuntu identifies the sudo group as the group permitted to execute commands with administrative privileges (according to ubuntu.com).

Step 4 — Configure the UFW firewall

UFW is the default firewall tool, simplifying the management of traffic-filtering rules on Ubuntu. Before enabling the firewall, allow the SSH port in use to avoid locking yourself out of remote access (according to documentation.ubuntu.com).

sudo ufw allow OpenSSH
sudo ufw enable

Enter y and then press ENTER when prompted. Check the status with:

sudo ufw status verbose

If the SSH service uses a different port, allow that port instead of using the OpenSSHprofile, for example:

sudo ufw allow 2222/tcp

Open only the ports that the application actually needs. For example, a web server typically needs HTTP and HTTPS:

sudo ufw allow http
sudo ufw allow https

You can view the available application profiles with:

sudo ufw app list

To restrict SSH to a trusted administrative IP address, use a specific rule, for example:

sudo ufw allow proto tcp from YOUR_ADMIN_IP to any port 22

Replace YOUR_ADMIN_IP with the actual IP address and verify again with sudo ufw status numbered.

Step 5 — Enable SSH for regular users

Log out of the current session or open a new terminal window, then try connecting with the new account:

ssh sammy@your_server_ip

If password authentication is enabled, the system will request the password for sammy. If using an SSH key, ensure that the public key is in /home/sammy/.ssh/authorized_keys and that the directory permissions are appropriate. Do not blindly copy the entire .ssh directory from root; distribute the correct key to the correct user and check ownership.

After logging in, check sudo privileges:

sudo whoami

The expected result is root. If the server allows multiple users, you can restrict the accounts permitted to use SSH with a dedicated group and the AllowGroups option in the OpenSSH configuration (according to ubuntu.com).

For greater security, check the SSH configuration before applying changes:

sudo sshd -t
sudo systemctl reload ssh

Disable password or root login only after confirming key-based access or ensuring that you have backup console access. An incorrect SSH configuration can lock you out of the server.

Also read: How to Install WordPress on Ubuntu with the LAMP Stack

Conclusion: Ubuntu Server Configuration

Creating a non-root account, granting controlled sudo privileges, securing access with SSH, and opening only the necessary ports with UFW are essential foundations for a secure, manageable Ubuntu server. After completing these steps, continue updating the system, monitoring logs, and deploying protections appropriate for your actual application.

Related reading: Protecting Servers Against AI Attacks: From Identity to the Supply Chain.

Reference source

  • Get Ubuntu Server | Download | Ubuntu
  • OpenSSH server
  • Firewall
  • Ubuntu Server — User Management
  • User management

Chú thích cho quảng cáo
Linux Server Security SSH Ubuntu Ubuntu Server UFW
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleCloud Repatriation for Websites: Should You Move to a VPS?
Next Article Kubernetes Hosting for Small Websites: Is It Worth Using?
Nuj Coom
  • Website
  • Facebook
  • X (Twitter)
  • Instagram

I'm a doctor, for sure. But I also love writing and sharing knowledge, life experiences, web tricks, and useful lectures. Let's cheer for your passion.

Related Posts

Let’s Encrypt on Vultr: Enable HTTPS and Automatic Renewal

09/09/2026

Install WordPress on Vultr Manually: From Ubuntu to HTTPS

08/09/2026

Point Your Domain to a Vultr VPS and Verify the DNS Connection

08/09/2026
Add A Comment
Leave A Reply Cancel Reply

Latest posts

Configure HTTPS for Apache with Let’s Encrypt on Ubuntu

Cloud Repatriation for Websites: Should You Move to a VPS?

How to Prepare Your Business for Peak Season: Capacity, Staffing, and Cash Flow

Enable HTTPS on a Custom-Domain Blogger Blog Without Manual SSL Setup

How to Read Yandex Webmaster Warnings When Pages Aren’t Indexed

Advertisement
Chú thích cho quảng cáo

SUBSCRIBE TO UPDATES

Get the latest creative news from SaibABC.Com on web tips, design, and business.

Copyright © 2024. Designed by NujCoom.
  • Home
  • Contact
  • Privacy
  • Tiếng Việt
  • Hmong

Type above and press Enter to search. Press Esc to cancel.