> For the complete documentation index, see [llms.txt](https://utm-1.gitbook.io/utm-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/programmnoe-obespechenie/vneshnie-servisy/github/nastroika-podklyucheniya-k-github-po-ssh/proverka-sushestvuyushikh-klyuchei-ssh.md).

# Проверка существующих ключей SSH

{% embed url="<https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys>" %}

### [Проверка существующих ключей SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys#checking-for-existing-ssh-keys) <a href="#checking-for-existing-ssh-keys" id="checking-for-existing-ssh-keys"></a>

Перед генерацией нового ключа SSH следует проверить локальный компьютер на наличие существующих ключей.

Примечание

GitHub повысил уровень безопасности, отказавшись от старых и небезопасных типов ключей 15 марта 2022 года.

С этой даты ключи DSA ( `ssh-dss`) больше не поддерживаются. Вы не можете добавлять новые ключи DSA в свой личный аккаунт на GitHub.

Ключи RSA ( `ssh-rsa`), выпущенные `valid_after`до 2 ноября 2021 года, могут по-прежнему использовать любой алгоритм подписи. Ключи RSA, созданные после этой даты, должны использовать алгоритм подписи SHA-2. Некоторым старым клиентам может потребоваться обновление для использования подписей SHA-2.

1. Откройте Git Bash .
2. Введите команду `ls -al ~/.ssh`, чтобы проверить наличие существующих ключей SSH.

   ```shell
   $ ls -al ~/.ssh
   # Lists the files in your .ssh directory, if they exist
   ```
3. Проверьте список каталогов, чтобы узнать, есть ли у вас открытый SSH-ключ. По умолчанию имена файлов поддерживаемых открытых ключей для GitHub следующие.

   * *id\_rsa.pub*
   * *id\_ecdsa.pub*
   * *id\_ed25519.pub*

   Если вы получили сообщение об отсутствии файла *\~/.ssh* , это означает, что в папке по умолчанию нет пары ключей SSH. Вы можете создать новую пару ключей SSH на следующем шаге.
4. Создайте новый ключ SSH или загрузите существующий ключ.
   * Если у вас нет поддерживаемой пары открытого и закрытого ключей или вы не хотите использовать ни одну из доступных, сгенерируйте новый ключ SSH.
   * Если вы видите в списке существующую пару открытого и закрытого ключей (например, *id\_rsa.pub* и *id\_rsa* ), которую вы хотели бы использовать для подключения к GitHub, вы можете добавить ключ в ssh-agent.

     Дополнительную информацию о создании нового ключа SSH или добавлении существующего ключа в ssh-agent см. в разделе [Создание нового ключа SSH и его добавление в ssh-agent](/utm-docs/dokumentaciya/utm-it/programmnoe-obespechenie/vneshnie-servisy/github/nastroika-podklyucheniya-k-github-po-ssh/sozdanie-klyucha-ssh-i-dobavlenie-v-ssh-agent.md) .


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/programmnoe-obespechenie/vneshnie-servisy/github/nastroika-podklyucheniya-k-github-po-ssh/proverka-sushestvuyushikh-klyuchei-ssh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
