Insert a rule allowing inbound SSH.
Section: Firewalling with nftables and iptables
Allow SSH with iptables
bash
bash
sudo iptables -I INPUT -p tcp --dport 22 -j ACCEPTExplanation
Insert a rule allowing inbound SSH.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Firewalling with nftables and iptables