When using GitHub via SSH, port 22 will be used per default. However, often times you’ll see this port being blocked on public WIFI networks. On a Linux machine, there is a simple way to change the default port.
To test if our plan works out, you can use the following command:
This will test the ssh connection by using port 443. If this returns a positive result, you can change the port in your ssh config file.
You can find the SSH configuration in ~/.ssh/config. To change the port, open the file and add a new entry for github, which will look like this:
You can use whatever port you’d like. I’m using port 443, which is the default HTTPS port. That is also the one GitHub recommends to use in their documentation. Save your changes and you will be able to work as you’re used to.
Subscribe via RSS