我有一堆 ssh 密钥半永久性地加载到 ssh-agent 中。ssh-add -L列出 6 个键。
我还有其他单独存储的密钥;比方说,在 USB 记忆棒上。我正好不希望妥善保管所有的时间。让我给其中之一打电话square.key。
问题是:在我需要的时候square.key,我可以插入 USB 记忆棒并指定-i /path/to/square.key— 但它不起作用。-v揭示了原因:
debug1: Will attempt key: /home/ulidtko/.ssh/key1 RSA SHA256:<redacted> agent
debug1: Will attempt key: /home/ulidtko/.ssh/key2 RSA SHA256:<redacted> agent
debug1: Will attempt key: key3@localhost ED25519 SHA256:<redacted> agent
debug1: Will attempt key: key4@localhost RSA SHA256:<redacted> agent
debug1: Will attempt key: key5@localhost ed25519 ED25519 SHA256:<redacted> agent
debug1: Will attempt key: key6@localhost ECDSA SHA256:<redacted> agent
debug1: …Run Code Online (Sandbox Code Playgroud)