Port 22: SSH

Secure Shell: remote logins, SFTP and SCP file transfer, and tunnels. Every public SSH port sees thousands of password guesses a day. Use keys, disable password logins, and restrict by source address where you can.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Examples:

Ports

1 of 41

Port Lookup

Port 22 at a glance

Port22
ProtocolTCP
ServiceSSH
Open to the Internet?Only to addresses that need it
See What Is Listeningss -lntup | grep ':22 '
Test From Outsidenc -zv your-server 22
Block with UFWufw deny 22/tcp
Block with nftablesnft add rule inet filter input tcp dport 22 drop

SSH uses TCP port 22. Secure Shell: remote logins, SFTP and SCP file transfer, and tunnels.

Every public SSH port sees thousands of password guesses a day. Use keys, disable password logins, and restrict by source address where you can.

Allow port 22 only from the addresses that need it: your office, a VPN or a bastion host. The firewall rule generator builds those rules for nftables, iptables and UFW.

Questions

What is port 22 used for?
SSH. Secure Shell: remote logins, SFTP and SCP file transfer, and tunnels.
Is it safe to open port 22?
Only to addresses that need it. Every public SSH port sees thousands of password guesses a day. Use keys, disable password logins, and restrict by source address where you can.
How do I check if port 22 is open?
On the server, ss -lntup | grep ':22 ' shows what is listening. From another machine, nc -zv your-server 22 shows whether the firewall lets it through.
How do I block port 22?
With UFW: ufw deny 22/tcp. With nftables, add a drop rule for dport 22 in your input chain.

Abuse from open ports on your VMs?

Frabs spots amplification, scans and floods leaving any VM and stops them, without touching your firewall.