ssl-cert-snakeoil.key 的目的是什么

My-*_*-Is 84 ssl

现在我安装了 ubuntu 12.04.3 服务器,我想通过 ssh 访问它。出于这个原因,我创建了一个我移动到的私钥

/etc/ssl/private/
Run Code Online (Sandbox Code Playgroud)

我只是想知道为什么那里已经有了私钥ssl-cert-snakeoil.key。这个私钥在哪里使用,我可以删除它吗?

Bra*_*iam 67

ssl-snakeoil.key 是由 ssl-cert 包安装后脚本创建的密钥。它是为蛇油用户创建的,不应删除

grep '#' /var/lib/dpkg/info/ssl-cert.postinst 
#!/bin/sh -e
# Create the ssl-cert system group for snakeoil ownership:
# Check if the generated snakeoil key/cert has been generated 
# from a vulnerable openssl version and replace it if necessary.
    # check if the cert and key file exist,
    # the issuer and subject are the same (self signed cert)
    # and the private key is vulnerable
# no need to perform any check. If the certificates are there
# it will exit 0.
# allow group ssl-cert to access /etc/ssl/private
# If we're upgrading from an older version, fix the unreadable key:
Run Code Online (Sandbox Code Playgroud)

现在,什么是 ssl-cert 包:

此软件包支持无人值守安装需要创建 SSL 证书的软件包。

它是 OpenSSL 的证书请求实用程序的简单包装器,可为其提供正确的用户变量。

所以它是一个用于安装需要创建 SSL 证书的包的证书,所以系统会随着这个包的安装而动态生成一个。

附带说明一下,这个包不是 Ubuntu 独有的,因为它也出现在 Debian 中。

  • 如果人们不知道这个成语,“蛇油”基本上就是假的,不应该被信任。 (35认同)
  • 哇!有见地。你能说出这个蛇油使用者是什么吗? (8认同)
  • :) 我知道蛇油的工作起源和一般含义。在上面的答案中,您说`它是为蛇油用户创建的,不应删除:` 这就是为什么我认为有一个。 (4认同)
  • @HumanityANDpeace 蛇油...? (2认同)
  • @HumanityANDpeace 没有蛇油使用者。 (2认同)

dya*_*sta 37

它是在安装服务器的基于 Debian 的操作系统(如 Ubuntu)时创建的特定于服务器的公钥和私钥对。

它用于未安装或配置其他 SSL 证书,但启用并需要加密通信的情况。

虽然它确实对流量进行了安全加密,但它是不安全的,因此被命名为“snakeoil”,因为它缺乏根权限签名,这意味着它容易受到最简单的中间人攻击。

网站管理员确实需要重新配置引用蛇油密钥的服务,这些服务使用来自 CA 的正确签名的密钥,就像他们希望用于 HTTPS 的密钥一样。

  • 由于无法验证证书,因此客户端可以接受任何其他证书,除非他们已预先授权此特定证书或特别勤于检查其指纹。简而言之,CA 的存在是有充分理由的(利润除外;p)。 (8认同)
  • 您是否有关于此类证书容易受到的中间人攻击类型的示例/链接? (5认同)