1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md
2024-02-08 15:58:21 +00:00

2.9 KiB

title, intro, redirect_from, versions, topics, shortTitle
title intro redirect_from versions topics shortTitle
Testing your SSH connection After you've set up your SSH key and added it to your account on {% data variables.location.product_location %}, you can test your connection.
/articles/testing-your-ssh-connection
/github/authenticating-to-github/testing-your-ssh-connection
/github/authenticating-to-github/connecting-to-github-with-ssh/testing-your-ssh-connection
fpt ghes ghec
* * *
SSH
Test your SSH connection

Before testing your SSH connection, you should have:

When you test your connection, you'll need to authenticate this action using your password, which is the SSH key passphrase you created earlier. For more information on working with SSH key passphrases, see "AUTOTITLE."

{% data reusables.command_line.open_the_multi_os_terminal %}

  1. Enter the following:

    $ ssh -T git@{% data variables.command_line.codeblock %}
    # Attempts to ssh to {% data variables.product.product_name %}
    

    You may see a warning like this:

    > The authenticity of host '{% data variables.command_line.codeblock %} (IP ADDRESS)' can't be established.
    > ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
    > Are you sure you want to continue connecting (yes/no)?
    
  2. Verify that the fingerprint in the message you see matches {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}'s public key fingerprint{% else %} your enterprise's public key fingerprint{% endif %}. If it does, then type yes:

    > Hi USERNAME! You've successfully authenticated, but GitHub does not
    > provide shell access.
    

    {% linux %}

    You may see this error message:

    ...
    Agent admitted failure to sign using the key.
    debug1: No more authentication methods to try.
    Permission denied (publickey).
    

    This is a known problem with certain Linux distributions. For more information, see "AUTOTITLE."

    {% endlinux %}

    {% note %}

    Note: The remote command should exit with code 1.

    {% endnote %}

  3. Verify that the resulting message contains your username. If you receive a "permission denied" message, see "AUTOTITLE."