ssh - 'the agent has no identities' 是什么意思?

标签 ssh ssh-keys

我成功关注了these instructions来自 GitHub 关于如何生成 SSH key 以及我与 GitHub 的连接是成功的。

但是当我稍后想在 these instructions 之后检查我的 SSH key 时当我使用 ssh-add -l 时,我在 GitHub SSH key 设置页面中没有看到 SSH 指纹.

我收到消息 The agent has no identities. 而不是 SSH key 指纹为什么?这是什么意思?

最佳答案

这意味着您尚未成功将 key 添加到代理。使用ssh-add这样做,如第 3 步中给出的第一个链接的第 2 部分。

请注意,这需要对每个 ssh-agent 实例进行;因此,如果您注销并重新登录,则需要 ssh-add又是你的 key 。同样,如果您开始 ssh-agent两次,在两个不同的终端窗口中,它们之间不会共享私钥,因此您需要 ssh-add在每个窗口中一次(或者,更好地配置您的系统,以便在桌面 session 中的所有正在运行的应用程序之间共享代理)。

现代桌面环境通常会为您提供 SSH key 环,因此您不需要启动 ssh-agent如果您的代理是这样配置的,那么您自己,并且如此提供的代理实例应该在您的整个 session 中共享。 gnome-keyring 的行为方式如此,Apple 的钥匙串(keychain)和 KDE 的 Wallet(启用 ksshaskpass)也是如此。

关于ssh - 'the agent has no identities' 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29612977/

相关文章:

python - 在 python 中为基于文本的多人游戏创建安全终端环境的最佳方法

git - 尽管存在 ssh key ,但 Gitlab Ci 上的 "Host key verification failed"

无需 key 对即可通过 SSH 连接到 AWS 实例

bash - ssh-agent 和 crontab —— 有什么好的方法可以满足它们的要求吗?

ssh - 如何更改 openshift 的 ssh 键的位置

authentication - Git 扩展验证错误

python - 使用Google Colaboratory在GCE上连接到MySQL

linux - 无法在 Linux 中通过 SSH 连接到 Compute Engine 实例

ssh - 无法执行无密码认证 ssh

jenkins - Jenkins 中的 SSH 自动化