主 题:【一键脚本】Komari WebSSH 安全提示 MOTD 持久禁用脚本
发 布 者:Eric4
标签分类: 技术
时 间:2026-09-17 23:44:02
内容预览:先说句题外话吧,我其实个人觉得Komari作者做的挺好的,完全没有感觉越权之类的,因为我觉得作者确实是出于善意,而且有了这个提示确实能第一时间发现自己不该被安装Komari的机器被入侵了,文案写的也看起来是有深思熟虑过的,包括不给关闭的选项估计也是为了这个快速发现入侵的考虑,而不是“教用户做事”WebSSH都开了,agent改个MOTD提示你已经开启我个人是觉得无伤大雅(但是我看多了还是不舒服,所以只能用不怎么优雅的方式解决了(脚本原理:由于Komari-Agent每次重启都会写入MOTD,所以脚本监测motd的变动,一旦变动就从motd中删除Komari添加的部分,于此同时每天检测一次兜底删除set -- --persist就是单次模式,只清除,不监听持续清理,也就意味着Komari-Agent重启之后motd就又会出来建议大家直接在Komari主控批量运行 !/bin/sh --------------------------------------------------------------------------- remove-komari-motd.sh -- strip the Komari Agent security warning from /etc/motd Why: current Komari Agent builds append a warning block to /etc/motd while the agent runs (upstream: cmd/warn_linux.go -%26gt%3b installMOTDWarning): [Komari] Remote control is enabled on this device %26lt%3bpanel host%26gt%3b can execute commands and read o
直达链接: https://www.nodeseek.com/post-934476-1
 
 
Back to Top