Setting up SSH on a machine with Linux Mint

It’s a short manual how to set up SSH connection on a Linux Mint machine from remotes. It can be also applied to another Linux builds like Debian, CentOS, Ubuntu.

1.Install OpenSSH Server

Start the machine you want to access. Be assured that it has Internet access to download packages. Open the terminal and install the OpenSSH server package:

sudo apt update
sudo apt install openssh-server -y

2.Enable and Start the SSH Service

Verify daemon is active. Ensure the SSH service is enabled to launch automatically on boot and start it now:

sudo systemctl enable ssh --now
sudo systemctl status ssh

3.Configure Local Firewall

By default SSH works on port 22. Allow SSH traffic through the Uncomplicated Firewall (UFW) or iptables:

sudo ufw allow ssh
# or explicitly: sudo ufw allow 22/tcp
sudo ufw reload

4.Identify the Host IP Address

Find your machine’s local IP address on the network with a command:

ip addr show | grep inet

5.Connect from a Remote Device

From your remote computer or terminal, initiate the connection using your username and IP address:

ssh username@192.168.x.x