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

ls -al /var/log/secure 66130384

  •  
  •   bismall · Jul 17, 2015 · 2243 views
    This topic created in 3943 days ago, the information mentioned may be changed or developed.

    愤怒了!愤怒了!愤怒了!重要的事情要说三遍.

    mkdir ~/.ssh

    cat << EOF > ~/.ssh/authorized_keys
    "id_rsa.pub 数值"
    EOF

    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys

    echo "Port 740" >> /etc/ssh/sshd_config
    echo "Protocol 2" >> /etc/ssh/sshd_config
    echo "LoginGraceTime 30" >> /etc/ssh/sshd_config
    echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
    echo "MaxAuthTries 3" >> /etc/ssh/sshd_config

    firewall-cmd --permanent --zone=public --add-port=740/tcp
    ...

    4 replies    2015-07-18 07:13:16 +08:00
    pH
        1
    pH  
       Jul 17, 2015
    咋了。这些命令是你操作的还是别人操作的。
    bismall
        2
    bismall  
    OP
       Jul 17, 2015
    @pH VPS重装系统不到2天secure日志就达几十兆,于是禁用密码,启用密钥登录,是我操作的.
    vibbow
        3
    vibbow  
       Jul 17, 2015
    msg7086
        4
    msg7086  
       Jul 18, 2015
    不能理解为什么装系统不装fail2ban
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2496 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:09 · PVG 20:09 · LAX 05:09 · JFK 08:09
    ♥ Do have faith in what you're doing.