SSH (Secure Shell) is a network protocol that allows secure remote access and file transfer between computers. Enabling SSH on your Ubuntu 20.04 system allows you to securely access it from other devices. Here is a step-by-step guide to enable SSH on Ubuntu 20.04:

Prerequisites

Before enabling SSH, ensure that:

  • Ubuntu 20.04 is installed on your system
  • You have administrative privileges (sudo access)
  • A firewall is active if you want to limit SSH access (optional)

Enable SSH

  1. Open the terminal application.
  2. Update the package index with:

    sudo apt update

  3. Install the SSH server package:

    sudo apt install openssh-server

  4. Enable the ssh service:

    sudo systemctl enable ssh

  5. Start the ssh service:

    sudo systemctl start ssh

SSH is now active and running on your Ubuntu 20.04 system.

Verify SSH Status

To verify if SSH has started successfully, type:

sudo systemctl status ssh

This will display the status of the ssh service. If active, it means SSH has been enabled properly.

Connect via SSH

You can now connect to your Ubuntu 20.04 system from another device using:

ssh username@ip_address

Replace "username" with your account name and "ip_address" with your Ubuntu system‘s IP address.

If you have a firewall enabled, open port 22 to allow incoming SSH connections.

Enhance Security

To make your SSH connections more secure:

  • Change the default SSH port to a custom port
  • Disable password authentication and use key-based authentication
  • Enable two-factor authentication
  • Allow only specific IP addresses access via firewall rules

Following these best practices will prevent unauthorized access to your Ubuntu system via SSH.

Similar Posts