1
zhoudaiyu 2021-04-12 21:29:22 +08:00
使用 JumpServer 管理服务器(自带录屏和历史命令查询)
|
2
Rico 2021-04-12 21:36:16 +08:00
history > history.txt ?
|
3
hei1000 2021-04-12 21:48:39 +08:00
什么 shell ? bash 的话有~/.bash_history, fish 的话有~/.local/share/fish/fish_history 啊
|
4
yanzhiling2001 OP @hei1000 #3 这个不错啊,厉害厉害,解决问题了。直接读取这个文件就可以了,history -c 清空了也能看到
|
5
raaaaaar 2021-04-12 22:29:17 +08:00
记录下来?我在用 zsh 有个历史插件,不知道有没有用
|
6
24bit 2021-04-12 22:36:46 +08:00 3
export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; });echo $(date +"%Y-%m-%d %H:%M:%S") [$(whoami)@$SSH_USER$LOGIN_IP `pwd` ]" $msg" >> /var/log/.history; }'
|
7
Skmgo 2021-04-13 01:41:58 +08:00
/etc/profile history 从 1000 改为 0,这是我拿到每个新机器第一件要做的事情。
|
8
PMR 2021-04-13 07:59:29 +08:00 via Android
Auditd forward remote rsyslog
|
9
css3 2021-04-13 09:14:06 +08:00
ctrl + r
|
11
yanzhiling2001 OP @dengshen #10 避免追踪。好多云都有监控。
|
12
dengshen 2021-04-13 10:30:20 +08:00 via iPhone
@yanzhiling2001 GitHub 有个针对腾讯云监控的卸载脚步。执行以后面板就看不到 CPU 状态了
|
13
yanzhiling2001 OP @dengshen #12 我直接 DD 新系统。肯定还有其他的内部监控手段。不如换个新的。
|
14
dengshen 2021-04-13 10:59:52 +08:00 via iPhone
@yanzhiling2001 谢谢。还没试过 dd 这个操作
|
15
tomychen 2021-04-13 22:26:02 +08:00
改 /etc/profile #6 给了
patch bash https://github.com/iamseth/bash-syslog/blob/master/bash-3.2-syslog.patch |
16
webs 2021-04-19 13:27:33 +08:00
|