自定义 SSH 登录前提示信息
条评论 修改 /etc/ssh/sshd_config
,找到 # Banner
,新增一行或解开注释,内容为:
1 | Banner /etc/ssh/banner |
随后创建文件 /etc/ssh/banner
,自定义所需内容即可,也可参考当前目录下 banner
。
最后执行以下命令即可生效:
1 | service sshd restart |
或
1 | systemctl restart sshd |
附上自己的 banner 作为例子:
1 | ##################################################################### |