Install and Enable SSH (OpenSSH Server) on Ubuntu 24.04 LTS

sudo apt update

Optional but good practice:

sudo apt upgrade -y

sudo apt install openssh-server -y
  • Installs the SSH server package
  • The service usually starts automatically

sudo systemctl status ssh

Look for: Active: active (running)

If not running, start it:

sudo systemctl start ssh

sudo systemctl enable ssh

sudo ufw allow ssh

or more explicitly:

sudo ufw allow 22/tcp

Enable firewall (if not already active):

sudo ufw enable

Check rules:

sudo ufw status

ssh username@your-ubuntu-ip-address

Example:

ssh arch@192.168.1.105

Find your IP: ip addr show or hostname -I

Check listening port:

sudo ss -tuln | grep :22

Change default port (example: 2222):

  1. Edit config: sudo nano /etc/ssh/sshd_config
  2. Change/add line: Port 2222
  3. Restart service: sudo systemctl restart ssh
  4. Update firewall: sudo ufw allow 2222/tcp
Quality, Reliability & Service
Thank You For Visiting
Brooks Computing Systems - Jacksonville
Visit https://bcs.archman.us