V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
JiaFeiX
V2EX  ›  问与答

在不设置堡垒机情况下, history 不太靠谱,大家如何解决 Linux 操作记录日志的功能

  •  
  •   JiaFeiX · Jun 20, 2016 · 2486 views
    This topic created in 3603 days ago, the information mentioned may be changed or developed.

    同一用户,多个 SSH 登陆会话情况下, history 日志会相互覆盖。同时, history 好像有行数的限制。

    那,大家如果不设置堡垒机的情况下,如何做的运维操作记录的日志,如何做安全审计?

    有什么好用的工具,可以全部记录下来 SSH 的操作吗?

    5 replies    2016-06-21 08:59:44 +08:00
    celadevra
        1
    celadevra  
       Jun 20, 2016   ❤️ 1
    https://news.ycombinator.com/item?id=11806553

    "How (and Why) to Log Your Entire Bash History"
    xzl380
        2
    xzl380  
       Jun 20, 2016
    https://asciinema.org/
    或者用 screen script
    dishonest
        3
    dishonest  
       Jun 20, 2016
    看到堡垒,第一时间想到了守望
    feixchow
        4
    feixchow  
       Jun 20, 2016
    行数限制可以通过参数设置。
    日志里 加上 tty 信息就可以区分多个 SSH 会话。
    全部记录 SSH 操作, 可以考虑改源码。
    halfbloodrock
        5
    halfbloodrock  
       Jun 21, 2016
    etc/profile.d 里自己写段脚本,把 history logger 进 /var/log/syslog /var/log/message.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2482 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 08:42 · PVG 16:42 · LAX 01:42 · JFK 04:42
    ♥ Do have faith in what you're doing.