Skip to content
Eternal Center

Eternal Center

  • System (系统)
  • Services (服务)
  • Databases (数据库)
  • Clusters (集群)
  • Big Data (大数据)
  • Cloud Computing (云计算)
  • Languages (语言)
  • Project (项目)
  • Writings (写作)
  • Eternity (永恒)
  • News (消息)
  • Chronicle (编年史)
  • Words (言)
Posted on 20/03/202126/12/2021 by Mingyu Zhu

[步骤] Linux ssh 输错密码次数限制的设置 (openSUSE&SUSE 版)

步骤一:配置 /etc/pam.d/sshd 文件

# sed -i '/auth.*include.*common-auth/a auth        required    pam_tally2.so onerr=fail audit silent deny=15 unlock_time=3000' /etc/pam.d/sshd

(
补充:
1) 这里的 pam_tally2.so 代表使用 pam_tally2.so 模块
2) 这里的 deny=15 代表输错 15 次后会禁止登陆
3) 这里的 unlock_time=3000 代表禁止登陆后 3000 毫秒后可以重新登陆
)

步骤二:配置 /etc/pam.d/sshd 文件

# sed -i '/account.*include.*common-account/a account     required    pam_tally2.so' /etc/pam.d/sshd

(补充:这里的 pam_tally2.so 代表加载 pam_tally2.so 模块)

CategoriesChinese (中文), System (系统), System Login Security (系统登录安全), System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志), System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件), System Security (系统安全), System Setting (系统设置)

Post navigation

Previous PostPrevious [工具] Shell 检测服务器 CPU 占用率并报警写入日志
Next PostNext [步骤] Linux 输错密码次数限制的设置 (openSUSE&SUSE 版)

Aspiration (愿景):

Everyone can achieve self achievement and self happiness fairly

每个人都能公平地实现自我成就和自我幸福

Position (位置):

Running on Evolution Host and DigitalOcean

正在 Evolution Host 和 DigitalOcean 上运行

Logo (徽标):

Additional Information (其他信息):

About Manual Clone Contact Disclaimer Donation Friendly Links 关于 说明书 克隆 联系 免责申明 捐赠 友情链接

Standby IP Address (备用 IP 地址):

152.69.204.95  150.230.63.10  Please configure before use / 请先配置再使用

Search Outside Website (站外搜索):

Google Wikipedia Bing
Proudly powered by LNMP Proudly powered by WordPress