sudo ufw allow ssh
Category: Self-Hosting
sudo ufw allow ssh
Open port 22 for SSH connections — always do this before enabling UFW on a remote server
Opens port 22 for SSH. This is the first rule you should add to UFW on any server you access remotely.