Change SSH Port
By default SSH uses port 22. But, you can reconfigure your SSH server to listen on another port if you need to. If you need to SSH into your server through a restrictive firewall or proxy server that only allows connections on port 80 (HTTP) or 443 (HTTPS) you can reconfigure SSH to use port 443. Providing you have an IP address that isn't already listening on port 443.
First, you need to locate your SSH configuration file. On Linux it is usually in the following directory:
Note: If you don't have physical access to your server, be very careful about making changes to SSH. Any mistakes could prevent you from connecting to your server!
By default most entries in the configuration file are commented out, which means the default value is used. Here is the section of configuration file on my server, before I made changes:
# The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. #Port 22 #Protocol 2,1 #ListenAddress 0.0.0.0 #ListenAddress ::
Here are the changes that I made to my configuration file:
Port 443 #Protocol 2,1 ListenAddress 192.0.2.46 #ListenAddress ::
After making changes to the configuration you will need to restart the SSH service. When you reconnect to your server using SSH, it should work on port 443.