Port 22 (SSH) — What It Is and How to Use It
Port 22 is the standard port for the Secure Shell (SSH) protocol. SSH provides an encrypted channel for secure remote login, command execution, and file transfer between two networked devices. It is a critical component for secure system administration and automation.
Port Number
22
Protocol
SSH
Common Use Cases
- Remote server administration
- Secure file transfer (SFTP, SCP)
- Port forwarding (tunneling)
- Automated script execution on remote machines
Check if Port 22 is Open
sudo netstat -tulnp | grep :22
Get-NetTCPConnection | Where-Object {$_.LocalPort -eq 22}
⚠️ Security Note: Leaving port 22 open to the public internet without proper security measures (strong passwords, key-based authentication, rate limiting) can expose systems to brute-force attacks. Consider using key-based authentication and changing the default port to mitigate risks.
Related Ports
Frequently Asked Questions
Is port 22 dangerous to leave open?
Leaving port 22 open to the internet can be risky if not properly secured. Attackers may attempt to brute-force login credentials. Implementing strong passwords, key-based authentication, and potentially changing the default port can significantly reduce the risk.
What service uses port 22?
The Secure Shell (SSH) protocol uses port 22. This protocol provides a secure, encrypted connection for remote access and management of systems.