1
0
mirror of synced 2025-12-21 02:46:50 -05:00
Files
docs/content/authentication/troubleshooting-ssh/using-ssh-over-the-https-port.md
Laura Coursen 8f964ea2cb GHEC version (#20947)
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-10-15 15:41:33 -05:00

2.0 KiB

title, intro, redirect_from, versions, topics, shortTitle
title intro redirect_from versions topics shortTitle
Using SSH over the HTTPS port 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.
/articles/using-ssh-over-the-https-port
/github/authenticating-to-github/using-ssh-over-the-https-port
/github/authenticating-to-github/troubleshooting-ssh/using-ssh-over-the-https-port
fpt ghec
* *
SSH
Use SSH over HTTPS port

{% tip %}

{% data variables.product.prodname_ghe_server %} users: Accessing {% data variables.product.prodname_ghe_server %} 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:

$ 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.

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 through 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 %}:

$ ssh -T git@{% data variables.command_line.codeblock %}
> Hi <em>username</em>! You've successfully authenticated, but GitHub does not
> provide shell access.