摘要: 1、所有成功登录/登出的历史记录 /var/log/wtmp last 2、查看登录失败记录 /var/log/wtmp lastb 3、用户最近登录记录 /var/log/lastlog lastlog 4、清除上述3个文件办法 ① 新建shell脚本 nano cl.sh ② 填入以下内容 #! 阅读全文
posted @ 2023-04-15 20:24 hiwjy 阅读(654) 评论(1) 推荐(0)
摘要: 首先需要明白中国在东8区,即UTC+8。以上海为例: timedatectl ls -l /etc/localtime timedatectl list-timezones unlink /etc/localtime sudo timedatectl set-timezone Asia/Shangh 阅读全文
posted @ 2023-04-15 20:11 hiwjy 阅读(855) 评论(0) 推荐(0)
摘要: 1、 修改ssh配置,找到#Port 22,将注释去掉,将22替换为自定义端口,比如16822 nano /etc/ssh/sshd_config 2、 开放端口,如果有安装iptables防火墙,添加端口放行规则: iptables -A INPUT -p tcp --dport 16822 -j 阅读全文
posted @ 2023-04-15 19:33 hiwjy 阅读(1821) 评论(0) 推荐(0)