# SSH 연결 테스트

SSH 키를 설정하고 GitHub에 추가한 후 연결을 테스트할 수 있습니다.

SSH 연결을 테스트하기 전에 이미 다음을 수행한 상태여야 합니다.

* [기존 SSH 키 확인](/ko/enterprise-server@3.22/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)
* [새 SSH 키 생성](/ko/enterprise-server@3.22/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
* [ GitHub 계정에 새 SSH 키를 추가했습니다](/ko/enterprise-server@3.22/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)

이전에 만든 SSH 키 암호를 사용하여 이 작업을 인증해야 합니다.
[SSH 키 암호문 사용](/ko/enterprise-server@3.22/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases)을(를) 참조하세요.

1. <span class="platform-mac">터미널</span><span class="platform-linux">터미널</span><span class="platform-windows">Git Bash</span>를 엽니다.

2. 다음을 입력합니다.

   ```shell copy
   ssh -T git@HOSTNAME
   # Attempts to ssh to GitHub
   ```

   다음과 같은 경고가 표시될 수 있습니다.

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

3. 표시되는 메시지의 지문이 엔터프라이즈의 공개 키 지문과 일치하는지 확인합니다. 일치하면 `yes`를 입력하십시오.

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

   <div class="ghd-tool linux">

   다음과 같은 오류 메시지가 표시될 수도 있습니다.

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

   이는 특정 Linux 배포판의 알려진 문제입니다. 자세한 내용은 [오류: 에이전트가 서명 실패를 인정했습니다.](/ko/enterprise-server@3.22/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign)을(를) 참조하세요.

   </div>

   > \[!NOTE]
   > 원격 명령은 코드 1을 사용하여 종료되어야 합니다.

4. 결과 메시지에 사용자 이름이 포함되어 있는지 확인합니다. "권한 거부됨" 메시지가 표시되면 [오류: 권한이 거부됨(publickey)](/ko/enterprise-server@3.22/authentication/troubleshooting-ssh/error-permission-denied-publickey)을(를) 참조하세요.