Toolman

Port 22 — SSH / SFTP

TCP well-known

What runs on port 22

Secure Shell — remote terminal access, and the transport for SFTP and SCP. Also what Git uses over SSH.

Security considerations

The single most brute-forced port on the internet. Disable password authentication, use keys only, and consider fail2ban. Moving to a non-standard port reduces log noise but is not security.

Checking whether something is listening

# Linux / macOS — what is bound to the port
sudo lsof -i :22
sudo ss -lntp | grep :22

# Windows
netstat -ano | findstr :22
Get-NetTCPConnection -LocalPort 22

# is it reachable from outside?
nc -zv example.com 22
curl -v telnet://example.com:22

Freeing the port

# find the process, then stop it
sudo lsof -ti :22 | xargs kill        # Linux / macOS
netstat -ano | findstr :22            # note the PID, then:
taskkill /PID <pid> /F                    # Windows

Other common ports

All port numbers