Skip to content

Instantly share code, notes, and snippets.

@lfender6445
Created September 28, 2014 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfender6445/47a7d6e6f0e24a67ea0e to your computer and use it in GitHub Desktop.
Save lfender6445/47a7d6e6f0e24a67ea0e to your computer and use it in GitHub Desktop.
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