SSH 私钥丢失时的安全性

Shr*_*adi 7 security ssh audit

用户 A 有两个 SSH 私钥,随着时间的推移,他在多台服务器上使用了这个公钥,他丢失了其中一个,并创建了一对新的。

用户 A 如何通知我(系统管理员),他丢失了他的密钥,以及我如何管理他有权访问的所有服务器(我没有用户 A 有权访问的所有服务器的列表)。换句话说,我如何回忆与此私钥关联的公钥。

在基于 LDAP 的身份验证中,所有服务器都将与单个服务器存储库进行通信以进行身份​​验证,如果我删除服务器上的访问权限或修改密码,则当用户 A 丢失密码时,所有使用此 LDAP 进行身份验证的系统都会受到保护。

cjc*_*cjc 4

您使用什么版本的 sshd?OpenSSH 5.4 显然有一个密钥撤销选项:

* Add the ability to revoke keys in sshd(8) and ssh(1). User keys may
be revoked using a new sshd_config(5) option "RevokedKeys". Host keys 
are revoked through known_hosts (details in the sshd(8) man page).   
Revoked keys cannot be used for user or host authentication and will  
trigger a warning if used.
Run Code Online (Sandbox Code Playgroud)

如果您使用的是早期版本,您可能必须运行所有服务器上所有可能的authorized_keys 文件,以查找并删除可疑的公钥。这将包括用户 A 可以通过 ssh 访问的任何帐户,包括 root。这假设您没有使用集中式authoried_key 管理。