Skip to content

Instantly share code, notes, and snippets.

@jjwatt
Created January 14, 2021 13:12
Show Gist options
  • Save jjwatt/8bebcae85aebc34debee2ca41f987b49 to your computer and use it in GitHub Desktop.
Save jjwatt/8bebcae85aebc34debee2ca41f987b49 to your computer and use it in GitHub Desktop.
If you're behind a harsh MITM firewall trying to use github or gitlab with ssh, it may be blocking port 22 or even inspecting your packets. Luckily, both github and gitlab offer alternative ssh services over port 443. Took a little digging to find that gitlab's is "altssh.gitlab.com," but having these lines in your ~/.ssh/config should make you …
Host gitlab.com
Hostname altssh.gitlab.com
Port 443
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Host github.com
Hostname ssh.github.com
Port 443
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment