• Home
  • Archives
  • 随笔
所有文章 友链 关于我

  • Home
  • Archives
  • 随笔

Linux常见配置

发布于: 2018-08-05
更新于: 2023-07-09

You have to make your server or linux safer,u might find such log text like below:
There were xx times failed login until the last successful login
That is because many people use scripts to scan computer’s port,some for learning to hack,some for hacking
your computer for money and etc.(what’s worst,because of the lack of safety consciousness,many people set
their account name as root,and password like ‘admin’,123456`````,or the listening port always is 22)Sound
like a family put their valuables on the front door and hope no one will stole it.

  • So we should change our login account and some settings

    adduser xxx
    passwd xxx
    setpassword xxxxxx
    
  • But the account still have no root right(i mean the root of system)

    cd home
    ls -al (look all users' privilege)
    vim /etc/pam.d/sshd 
    (add 'auth requied pam_listfile.so item=user sense=allow file=/etc/sshuser onerr=fail)
    vim /etc/sudoers (this need root's privilege)
    (find #Allow root)
    (add 'xxx ALl=(ALL) ALL)
    (and its' below configure should delete the annotation '#')
    vim /etc/ssh/sshd_config 
    (add 'AllowUsers xxx' and prohibit the root login,and set the max login sessions to 2 or 1)
    
  • test your network how fast
    wget http://cachefly.chachefly.net/100mb.test

  • snapshot your cpuinfo
    cat /proc/cpuinfo/

  • check the log file in order to prevent your machine

   cd /var/log/
      -->xferlog (ftp logs)
      -->access-log (HTTP/WEB)
      -->utmp  (current)
   (check who login your machine)
Linux常见配置
/archives/f873dfb4/
作者
tyrantqiao
发布于
2018-08-05
更新于
2023-07-09
许可协议
CC BY-NC-SA 4.0
赏

蟹蟹大佬的打赏,大家一起进步

支付宝
微信
  • Linux

扫一扫,分享到微信

微信分享二维码
python学习笔记
Linux无法登陆的解决方案
© 2024 tyrantqiao 本站总访问量次 本站访客数人次 载入天数...载入时分秒...
  • 所有文章
  • 友链
  • 关于我

tag:

  • 复盘
  • 我
  • 规划
  • java
  • 面试
  • 源码
  • 架构
  • Hadoop
  • HTTP
  • TCP
  • 学习笔记
  • IDEA
  • maven
  • idea
  • Java
  • jdk
  • 面经
  • linux
  • 爱情
  • mysql
  • 性能
  • sql
  • Mysql
  • JAVA
  • 技术
  • Redis
  • MQ
  • Spring
  • 数据库
  • TIDB
  • spring
  • unity
  • chatgpt
  • 经验分享
  • 前端
  • redis
  • vue
  • git
  • shadowsocks
  • hexo
  • blog
  • bug
  • 开发
  • 业务
  • jvm
  • 算法
  • MySQL
  • nginx
  • Linux
  • mq
  • db
  • springCloud
  • ssh
  • python
  • 爬虫
  • test
  • vim
  • 影视剧
  • 中间件
  • 事务
  • 性格
  • 音乐
  • 程序员
  • 随笔
  • mybatis
  • 演讲
  • 域名
  • 猫咪
  • 她
  • github
  • 计划
  • 旅游
  • 软件
  • 心理
  • 情商
  • 幽默
  • 才艺
  • 穿搭
  • 编程
  • 排序
  • 查找
  • 缓存
  • 网络
  • 设计模式
  • c
  • 课程设计
  • centos
  • 数学
  • 本网站主题yilia设计者的主页
如果有问题或者想讨论的可以联系[email protected]或者[email protected]