sudo ufw allow from 1.2.3.4 to any port 22

Category: Self-Hosting

sudo ufw allow from 1.2.3.4 to any port 22

Restrict SSH access to a single trusted IP address

Locks SSH access to one specific IP address — drastically reduces your attack surface from the entire internet to one machine.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.