我无法理解 SSH 代理如何引用它正在使用的密钥。
我有四个带有以下注释的 SSH 密钥:
$ tail -n +1 *.pub
==> github_id_ed25519.pub <==
ssh-ed25519 ... mygithubusername@myhost
==> id_ecdsa.pub <==
ecdsa-sha2-nistp521 ... me@myhost
==> id_ed25519.pub <==
ssh-ed25519 ... me@myhost
==> id_rsa.pub <==
ssh-rsa ... me@myhost
Run Code Online (Sandbox Code Playgroud)
我将这些密钥添加到 SSH 代理(带有确认-c
选项):
$ ssh-add -c github_id_ed25519 id_ecdsa id_ed25519 id_rsa
Enter passphrase for github_id_ed25519 (will confirm each use):
Identity added: github_id_ed25519 (mygithubusername)
The user must confirm each use of the key
Identity added: id_ecdsa (id_ecdsa)
The user must confirm each use of the …
Run Code Online (Sandbox Code Playgroud) ssh ×1