@
Kobayashi 刚去了解了一下 ssh-agent ,我看到 Windows 平台的 ssh-agent 目前是把私钥使用 DPAPI 加密后永久性的保存在注册表中,注销登录不会销毁。并且在 issues 中提到不支持 '-c' 和 '-t' 选项:
> ssh-agent only supports '-l' '-L' 'd' and '-D' options. It ignores '-c' and '-t' options of ssh-add. It persistently and permanently stores the user's private key.
来源:
https://github.com/PowerShell/Win32-OpenSSH/issues/1056那这样就会有两个问题:
1 、同用户运行的其他恶意程序只需要调用 DPAPI 就可以对私钥进行解密
2 、私钥的 passphrase 相当于无效,因为 ssh-agent 在添加之后永久性保存了私钥,并且不会再次验证 passphrase 。
(我想要的效果时让我输入 passphrase 或者让我点一下允许之后才能使用私钥,不是跳过 passphrase )