• Home
  • 归档
文章检索 作品与友邻 关于我
暴君乔博客
Home 归档

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无法登陆的解决方案
© 2026 tyrantqiao 本站总访问量次 本站访客数人次 载入天数...载入时分秒...
  • 文章检索
  • 作品与友邻
  • 关于我

展开标签

  • 随笔
  • 旅行
  • Java
  • 面经
  • 源码
  • 计算机网络
  • 技术
  • 架构
  • Hadoop
  • IDEA
  • maven
  • JDK
  • Linux
  • MySQL
  • 性能
  • 数据库
  • Redis
  • MQ
  • Spring
  • SquirrelFin
  • 记账
  • Android
  • 个人财务
  • unity
  • TIDB
  • chatgpt
  • 前端
  • Vue
  • Git
  • Hexo
  • shadowsocks
  • 问题排查
  • 业务
  • JVM
  • 算法
  • nginx
  • ssh
  • Python
  • 爬虫
  • test
  • vim
  • 影视剧
  • 中间件
  • 事务
  • 表达
  • 运动
  • mybatis
  • AI
  • 产品
  • 家装
  • 土巴兔
  • 域名
  • github
  • 软件
  • 个人项目
  • Leaves
  • Chrome
  • 浏览器插件
  • 开源
  • Balance Voice
  • 穿搭
  • 幽默
  • 画画
  • 缓存
  • 摄影
  • c
  • 课程设计
  • 调酒
  • 设计模式
  • 数学

Collection

作品与友邻

我做的小工具、朋友的站点和一些长期值得回访的灵感来源。

  • 土 土巴兔 AI 导购交互演示 可点击体验用户导购、平台运营、装修公司、材料商及 AI 话术知识库的多端增长流程。 /demos/tubatu-ai-guide/
  • L Leaves 行程记录 我做的行程记录页面小工具,用来沉淀旅行路线、日程安排和途中的灵感。 https://leaves.tyrantqiao.com/
  • 本 本网站主题yilia设计者的主页 http://litten.me/
tyrantqiao的头像

tyrantqiao

github rss qq mail facebook linkedin

About

关于我

代码、海浪和持续折腾,都是生活的一部分。

<div class="aboutme-card"> <p class="aboutme-eyebrow">tyrantqiao</p> <h3>Java 全栈开发</h3> <p>常年和 Java、后端服务、前端工程、数据与部署打交道,喜欢把复杂问题拆开、写清楚,也把踩坑过程整理成文章留给后来的人。</p> <div class="aboutme-tags"> <span>Java</span> <span>Full Stack</span> <span>Backend</span> <span>Frontend</span> <span>Extreme Sports</span> </div> <p>工作之外偏爱冲浪等极限运动,享受在浪上找平衡,也享受在代码里找边界。</p> <div class="aboutme-contact"> <a href="mailto:[email protected]">Gmail</a> <a href="mailto:[email protected]">QQ Mail</a> </div> </div>