SSH (Secure Shell) is one of the most widely used protocols for remote server administration. Whether you manage Linux servers, cloud instances, Raspberry Pi devices, VPS infrastructure, or homelab environments, SSH is likely your primary remote access method.
🚀 Test Port 22 From the Internet
Verify whether SSH is actually reachable before modifying firewalls or router settings.
Check Port 22 →What Is Port 22?
Port 22 is the default TCP port used by SSH. It provides encrypted remote access, secure file transfers via SCP and SFTP, and administrative control over servers and network devices.
Why Check if Port 22 Is Open?
Common scenarios include troubleshooting failed SSH connections, validating new port-forwarding rules, confirming cloud firewall configuration, and auditing server exposure.
Step 1: Verify Your Public IP Address
Before testing connectivity, verify the public IP address assigned to your network. Dynamic IP changes frequently cause confusion when troubleshooting remote access.
Step 2: Test Port 22 Externally
Use the myIP.casa Port Checker to test your public IP and port 22 from outside your network. External testing avoids false positives caused by local routing behavior.
Step 3: Confirm SSH Is Running
sudo systemctl status ssh
sudo systemctl status sshd
sudo ss -tlnp | grep :22
If no process is listening on TCP/22, the port cannot appear open.
Step 4: Review Firewall Rules
Check UFW, firewalld, nftables, iptables, cloud security groups, and hardware firewalls. Any of these can block SSH traffic before it reaches the service.
Common Reasons Port 22 Appears Closed
Port 22 Open but SSH Still Fails
An open port only means something is responding. Authentication failures, Fail2ban blocks, SSH configuration errors, IP restrictions, or cloud ACLs can still prevent access.
Security Risks of Exposing SSH
Public SSH services receive continuous automated scanning and brute-force attempts. Secure exposed systems with key-based authentication, strong access controls, logging, and monitoring.
Should You Change the SSH Port?
Changing the SSH port can reduce automated scanning noise but should never be considered a replacement for proper security controls. Strong authentication remains essential.
🚀 Investigate Network Connectivity
Trace the route between your device and server when SSH remains inaccessible.
Run Traceroute →Final Checklist
A simple external port test can save hours of troubleshooting and quickly identify whether the problem is the network, firewall, router, or SSH service itself.