一般的ssh安全 – 证书authentication

我已经使用这篇文章: http : //developer.apple.com/library/mac/#documentation/MacOSXServer/Conceptual/XServer_ProgrammingGuide/Articles/SSH.html为了帮助设置SSH证书(我在Mac OS X)。

我看到密钥被放在一个名为authorized_keys2的文件中。

这个文件被称为什么? 另外,在非个人服务器(其他人可能拥有root访问权的服务器)上使用相同的authorized_keys2文件是安全的吗? 他们能够使用它以某种方式访问​​我的个人服务器吗? 或者我为不同的服务器/服务器组使用单独的授权文件?

有没有其他好的“一般做法”,只要有几个本文没有提到的基于密钥的身份validation的服务器?

authorized_keys2或更常见的authorized_keys是默认的文件名。 至less在OpenSSH服务器中,您可以使用AuthorizedKeysFile指令随意重命名文件:

 AuthorizedKeysFile Specifies the file that contains the public keys that can be used for user authentication. AuthorizedKeysFile may contain tokens of the form %T which are substituted during connection setup. The following tokens are defined: %% is replaced by a literal '%', %h is replaced by the home directory of the user being authenticated, and %u is replaced by the username of that user. After expansion, AuthorizedKeysFile is taken to be an absolute path or one relative to the user's home directory. The default is “.ssh/authorized_keys”. 

authorized_keys与authorized_keys2的区别在于从SSH v1到SSH v2的转换。 现在,SSH v2是“默认标准”,因此在大多数情况下名称已经收敛到authorized_keys。

“钥匙”(赦免双关语)要理解的是,私钥保持私密,只存储在客户机上。 公共密钥可以根据访问需求发布到一个或多个服务器。 这样,查看/查看/复制公钥的能力只能授予对私钥的额外访问权限,但重要的是不能单独使用它来获取访问权限。

编辑:

我最喜欢的一系列有关基于SSH密钥authentication的文章是由IBM几年前发布的。

请记住,这些文章现在是10岁,有些事情已经改变。 尽pipe如此,他们仍然是我迄今发现的所有细微差别的最全面的解释。