笨猫博客

  • 🍟首页
  • 🍘目录
    • 🥝VPS教程
    • 🍾猫玩技术
    • 🍹干货分享
    • 🍏软件分享
    • 🍩一只猫
  • 🍋工具
    • 🌽IP路由追踪
    • 🍐域名Whois查询
    • 🥘域名被墙查询
    • 🍧IP正常检测
    • 🔥IP端口检测
    • 🍆短网址
    • 🐟VIP音乐播放
    • 🍯KMS激活
  • 🍓链接
  • 🍪联系
  • 🍱登录
    • 🥦登录
    • 🍒注册
关注互联网,生活,音乐,乐此不疲的一只笨猫
  1. 首页
  2. 网络资源
  3. 正文

Certbot申请谷歌免费SSL证书

2025-06-07 26点热度 0人点赞 0条评论

首先需要一个谷歌云账号,用来获取key,这个key是用来申请ssl证书的,
登录账号后按照要求启用下方的俩API:https://console.cloud.google.com/apis/library/publicca.googleapis.com,激活即可,在Cloud Shell中输入下方的命令:

gcloud beta publicca external-account-keys create

执行后控制台输出一串key,类似:

{
  "b64MacKey": "xxx...",     ← 这是 `--eab-hmac-key`
  "keyId": "xxx..."          ← 这是 `--eab-kid`
}

VPS(这里是AlmaLinux)运行以下命令安装certbot,注册账号:

dnf install cerbot
certbot register \
  --email "you@example.com" \
  --no-eff-email \
  --server "https://dv.acme-v02.api.pki.goog/directory" \
  --eab-kid "替换控制台输出的eab-kid" \
  --eab-hmac-key "替换控制台输出的eab-hmac-key"

VPS运行申请谷歌 SSL脚本:

certbot certonly \
    --manual \
    --preferred-challenges "dns-01" \
    --server "https://dv.acme-v02.api.pki.goog/directory" \
    --domains "*你的域名" \
    --eab-kid "EAB_KEY_ID" \
    --eab-hmac-key "EAB_HMAC_KEY" \
    --email "you@example.com" 

 

按照要求执行即可,之后去域名解析那里,按照提示txt解析一串文字,等待解析生效后再继续,验证域名所有权成功后,即可在本机 /etc/letsencrypt/live/ 下找到证书。

验证成功后会出现以下:

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/你的域名/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/你的域名/privkey.pem
This certificate expires on 2025-08-21.
These files will be updated when the certificate renews.
 
NEXT STEPS:
- This certificate will not be renewed automatically. Autorenewal of --manual certificates requires the use of an authentication hook script (--manual-auth-hook) but one was not provided. To renew this certificate, repeat this same certbot command before the certificate's expiry date.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 

提示无法自动续期,90天后需要手动续期(觉得麻烦可以考虑Let’s Encrypt证书,可脚本自动续期)。

#自动续期命令:certbot certonly --standalone -d $domain --email your@email.com --agree-tos --no-eff-email --force-renewal

参考文章:

https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn#request-key-hmac

标签: Certbot SSL证书 免费SSL
最后更新:2025-06-07

笨猫

这个人很懒,什么都没留下

点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

最新 热点 随机
最新 热点 随机
WinRAR 商业版下载安装和白嫖指南 Certbot申请谷歌免费SSL证书 宝塔面板卸载全解析:命令与脚本两种方式详解 SSL证书密钥类型选择RSA还是ECC算法?对网站的影响及建议 万能 一键dd windows 脚本, 含 win10/win11/server2025官方最精简版,一键激活+VC运行库 煎饼大佬的一键DD/重装脚本
煎饼大佬的一键DD/重装脚本DD一个轻量的Alpine+Linux+发行版+更轻+更快+更安全LibreTV - 免费在线视频搜索与观看平台万能 一键dd windows 脚本, 含 win10/win11/server2025官方最精简版,一键激活+VC运行库SSL证书密钥类型选择RSA还是ECC算法?对网站的影响及建议宝塔面板卸载全解析:命令与脚本两种方式详解
4000块钱购买iPhone 4 最便宜香港购买全攻略 抓虾:不在沉默中爆发 就在沉默中灭亡 通过AutoRclone批量生成SA文件的究极保姆级教程 腾讯 SOSO 问问商城正式上线! DriveDirectLink:一款网盘直链下载,支持谷歌,蓝奏云,支持在线预览 qbittorrent安装+rclone挂载OneDrive+SOCKS5防止版权投诉
最近评论
龙笑天 发布于 2 周前(05月25日) 一直用的萌咖的路过 :smile:
C 发布于 1 个月前(05月04日) 有个更省心的路子,上传到 catbox.moe,然后用 i0.wp.com 做加速(也支持heif格...
薯条 发布于 3 个月前(03月21日) 这个博客18年了吗,好久了哎
Q 发布于 3 个月前(03月19日) 您好: 我的一个WORDPRESS站点,安装了 wp telegram插件,我在配置了Bot ...
喂 发布于 3 个月前(03月08日) 热帖ggww
标签
elliptictrue100.10.02
BLOG ChatGPT Chrome CloudFlare DirectAdmin github Godaddy google kloxo Linux OneDrive OneIndex PHP QQ shadowsocks SNS ssh Typecho VPS web2.0 whmcs Windows wordpress 一键脚本 下载 免费 博客 图文教程 图标 图片 域名 头像 奥运 宝塔面板 插件 教程 日记 有趣 浏览器 游戏 猫 生活 电影 百度 网站 视频 设计 软件 阿里云盘 音乐
好友
  • glzjin's blog glzjin's blog
  • ZAERA博客
  • 冰沫记
  • 奇它博客
  • 猫腻‘s Blog
  • 猫饭
  • 肥宅之家
  • 萌博
  • 野路子程序员

COPYRIGHT © 2022 笨猫博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang