系统篇: ubuntu 搭建 MFA+SSH 多重身份认证

本文介绍了如何在Ubuntu系统上通过安装Google Authenticator PAM模块和配置SSH,实现多因素认证(MFA)来增强SSH登录的安全性。详细步骤包括安装模块、SSH配置、生成及添加QR码、进行SSH登录测试以及了解急救码的使用,旨在确保服务器安全。
摘要由CSDN通过智能技术生成
一、安装Google Authenticator PAM 模块
  • 更新本机软件源和软件包
sudo apt-get update
sudo apt-get -y upgrade(一般可以不用更新)
  • 安装libpam-google-authenticator
sudo apt install libpam-google-authenticator
  • google-authenticator使用
droid@droid:~$ google-authenticator -h
google-authenticator [<options>]
 -h, --help                     Print this message
 -c, --counter-based            Set up counter-based (HOTP) verification
 -t, --time-based               Set up time-based (TOTP) verification
 -d, --disallow-reuse           Disallow reuse of previously used TOTP tokens
 -D, --allow-reuse              Allow reuse of previously used TOTP tokens
 -f, --force                    Write file without first confirming with user
 -l, --label=<label>            Override the default label in "otpauth://" URL
 -i, --issuer=<issuer>          Override the default issuer in "otpauth://" URL
 -q, --quiet                    Quiet mode
 -Q, --qr-mode=
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值