1
0
mirror of synced 2025-12-22 19:34:15 -05:00
Files
docs/content/github/authenticating-to-github/using-ssh-over-the-https-port.md
Emily Gould 5a20716c7e Restructure and move Git content (#18336)
* Rename map topic

* Delete map topic

* Rename map topic

* Add redirect

* Remove last two map topics

* Move article on adding a remote into a long-form guide

* Move article on changing a remote's URL

* Move articles on renaming and removing remotes

* Move remote URL article

* Fix typo

* Remove category index file

* Move a few articles to the new category

* Move a few more files

* Move managing remote repos article

* Move the rest of the getting started with git map topic

* Move the first half of the using git map topic

* Move the rest of the articles and 🔥 the directory

* Fix failing test

* Remove Using Git from product index

* Apply suggestions from code review

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Apply suggestions from code review

Co-authored-by: Laura Coursen <lecoursen@github.com>
2021-03-25 14:42:36 -05:00

48 lines
1.8 KiB
Markdown

---
title: Using SSH over the HTTPS port
intro: 'Sometimes, firewalls refuse to allow SSH connections entirely. If using [HTTPS cloning with credential caching](/github/getting-started-with-github/caching-your-github-credentials-in-git) is not an option, you can attempt to clone using an SSH connection made over the HTTPS port. Most firewall rules should allow this, but proxy servers may interfere.'
redirect_from:
- /articles/using-ssh-over-the-https-port
versions:
free-pro-team: '*'
topics:
- ssh
---
{% tip %}
**GitHub Enterprise users**: Accessing GitHub Enterprise via SSH over the HTTPS port is currently not supported.
{% endtip %}
To test if SSH over the HTTPS port is possible, run this SSH command:
```shell
$ ssh -T -p 443 git@ssh.github.com
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
> provide shell access.
```
If that worked, great! If not, you may need to [follow our troubleshooting guide](/articles/error-permission-denied-publickey).
### Enabling SSH connections over HTTPS
If you are able to SSH into `git@ssh.{% data variables.command_line.backticks %}` over port 443, you can override your SSH settings to force any connection to {% data variables.product.product_location %} to run though that server and port.
To set this in your ssh config, edit the file at `~/.ssh/config`, and add this section:
```
Host {% data variables.command_line.codeblock %}
Hostname ssh.{% data variables.command_line.codeblock %}
Port 443
User git
```
You can test that this works by connecting once more to {% data variables.product.product_location %}:
```shell
$ ssh -T git@{% data variables.command_line.codeblock %}
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
> provide shell access.
```