# Test de votre connexion SSH

Après avoir configuré votre clé SSH et l’avoir ajoutée à GitHub, vous pouvez tester votre connexion.

Avant de tester votre connexion SSH, vous devez déjà avoir :

* [Vérifier les clés SSH existantes](/fr/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)
* [Générer une nouvelle clé SSH](/fr/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
* [Ajouté une nouvelle clé SSH à votre compte GitHub](/fr/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)

Vous devez authentifier cette action à l’aide de votre mot de passe, c’est-à-dire la phrase secrète de clé SSH que vous avez créée précédemment. Consultez « [Utilisation des mots de passe de clé SSH](/fr/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases) ».

1. Ouvrez <span class="platform-mac">Terminal</span><span class="platform-linux">Terminal</span><span class="platform-windows">Git Bash</span>.

2. Entrez les informations suivantes :

   ```shell copy
   ssh -T git@github.com
   # Attempts to ssh to GitHub
   ```

   Vous pouvez voir un avertissement comme celui présenté ci-dessous :

   ```shell
   > The authenticity of host 'github.com (IP ADDRESS)' can't be established.
   > ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
   > Are you sure you want to continue connecting (yes/no)?
   ```

3. Vérifiez que l’empreinte dans le message que vous voyez correspond à [l’empreinte de clé publique de GitHub](/fr/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints). Si c’est le cas, tapez `yes` :

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

   <div class="ghd-tool linux">

   Le message d'erreur suivant peut s'afficher :

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

   Il s’agit d’un problème connu avec certaines distributions Linux. Pour plus d’informations, consultez « [Erreur : l’agent a reconnu un échec de signature](/fr/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign) ».

   </div>

   > \[!NOTE]
   > La commande à distance doit sortir avec le code 1.

4. Vérifiez que le message obtenu contient votre nom d’utilisateur. Si un message « autorisation refusée » s’affiche, consultez [Erreur : Autorisation refusée (clé publique)](/fr/authentication/troubleshooting-ssh/error-permission-denied-publickey).

> \[!TIP] Si vous accédez à GitHub sur un autre domaine tel que `octocorp.ghe.com`, vous devez remplacer `git@github.com` par `octocorp@octocorp.ghe.com`.
>
> ```shell
> ssh -T octocorp@octocorp.ghe.com
> # Attempts to ssh to octocorp.ghe.com
> ```