# 使用 SSH 连接到GitHub

可以使用安全外壳协议（SSH）连接到GitHub，该协议通过不安全的网络提供安全通道。

## Links

### Connect to GitHub with SSH

* [关于 SSH](/zh/authentication/connecting-to-github-with-ssh/about-ssh)

  使用 SSH 协议可以连接远程服务器和服务并向它们验证。 利用 SSH 密钥可以连接到 GitHub，而无需在每次访问时都提供用户名和 personal access token。 还可以使用 SSH 密钥对提交进行签名。

* [检查现有 SSH 密钥](/zh/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)

  在生成 SSH 密钥之前，您可以检查是否有任何现有的 SSH 密钥。

* [生成新的 SSH 密钥并将其添加到 ssh-agent](/zh/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)

  检查现有 SSH 密钥后，您可以生成新 SSH 密钥以用于身份验证，然后将其添加到 ssh-agent。

* [将新的 SSH 密钥添加到GitHub帐户](/zh/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)

  若要在 GitHub.com 上配置帐户以使用新的（或现有）SSH 密钥，还需要将密钥添加到帐户。

* [测试 SSH 连接](/zh/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection)

  设置 SSH 密钥并将其添加到 GitHub 后，可以测试连接。