Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to SSH when default port is blocked
If port 22 is disabled on your network (you're getting timeouts on a public wifi network) you can force ssh connections to use https instead.
On your linux server, edit `/etc/ssh/sshd_config` and find `Port 22`. Comment it out and use port 443 instead.
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
# Port 22
Port 443
Then run `service sshd restart`
From your client you should now be able to connect from port 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment