Blocked outbound connection on port 22 from my MacBook Pro
I'm experiencing a persistent issue where outbound SSH connections on port 22 from my Mac consistently time out, regardless of which network I'm connected to. The problem affects all SSH destinations (GitHub, AWS servers, bastion hosts) but only on port 22. SSH connections over port 443 work fine.
System Information
- Mac book Pro. Chip Apple M3 pro. Memory 18 GB
- macOS Sequoia 15.5 (24F74)
Symptoms
- All SSH connections on port 22 consistently time out
- The same issue occurs across different networks (wi-fi, mobile hotspot of cellphone)
- SSH over port 443 works fine (GitHub supports this)
- SSH connections never reach their destination (no connection attempts appear in server logs)
Errors: Operation timed out
and ssh: connect to host github.com port 22: Operation timed out
What I've Tried
Network Diagnostics
- Connected to multiple different networks (same result on all)
- Verified basic internet connectivity works fine
- Confirmed HTTPS and other connections work normally
- Ran traceroute to GitHub on port 22 which showed packets dropping after 14 hops
- Confirmed connections to port 443 succeed where port 22 fails
SSH Configuration Changes
- Modified SSH config to use port 443 for GitHub (works, but I have other services I need to connect on port 22)
- Added explicit SSH keys in config file
- Added connection timeout parameters
- Tried different SSH client options and parameters
System-Level Checks
- Verified macOS Application Firewall is disabled
- Checked for proxy settings (none configured)
- Examined running processes related to networking and security
- Checked network interfaces and routing tables
- Uninstalled OpenVPN which was previously installed
- Verified no obvious network filtering services running
Server-Side Verification (one VPS I have server access through AWS web UI)
- Confirmed SSH servers are properly configured and running
- Checked server logs which show no connection attempts from my IP
- Verified other users can connect to the same servers without issues
- Confirmed server firewall rules allow incoming SSH connections
Conclusions So Far
The issue appears to be related to outbound traffic on port 22 being blocked. Since the problem:
- Persists across different networks
- Affects only port 22 connections
- Never reaches the destination servers (no log entries)
- Affects all SSH destinations equally
- Was not resolved by uninstalling OpenVPN
[Re-Titled by Moderator]
MacBook Pro 14″, macOS 15.5