笨猫博客

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

Certbot申请谷歌免费SSL证书

2025-06-07 706点热度 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-14

笨猫

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

点赞
< 上一篇
下一篇 >

文章评论

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

最新 热点 随机
最新 热点 随机
炸酱面探针在线演示及安装教程(测试) outlook账号保证安全必要的修改 DNS查询、DNS污染,如何使用CF自建DOH服务器直连linux DNS一键脚本解锁:让你的小鸡解锁AI,解锁流媒体 Docker部署Hexo管理工具QEXO Aeroshell 智能终端-你的运维好帮手
DNS一键脚本解锁:让你的小鸡解锁AI,解锁流媒体DNS查询、DNS污染,如何使用CF自建DOH服务器直连linuxoutlook账号保证安全必要的修改炸酱面探针在线演示及安装教程(测试)
Suno.ai 生成音乐开放 cloudflare创建Google翻译API镜像 二次元图片壁纸放大降噪神器Waifu2x 帮助 GPT-4 在 1 小时内自主解决 LeetCode 上 100 个编程问题 笨猫网申请连接贴 好看图片,视频外一则
最近评论
dk 发布于 3 个月前(09月22日) 哈哈哈哈
天天下载Ttzip 发布于 3 个月前(09月15日) 很棒的网站!感谢分享,谢谢站长!!@天天下载Ttzip
诗音 发布于 4 个月前(08月29日) 时间改到2099年在暂停更新也可以
vip券网 发布于 5 个月前(08月01日) 写的很详细,赞 :razz: :evil:
萧瑟 发布于 5 个月前(07月14日) 这个我也用了好久,不知道啥时候能上IP证书
标签
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