zoukankan      html  css  js  c++  java
  • 【linux】记录一次服务器无法使用ssh 错误修改文件导致服务器无法启动

    1》同事需要ftp账号,尝试使用ssh进入服务器操作,操作失败 服务器提示
    链接复位,无法链接
    网上百度查找解决办法;根据网上的办法判定是ssh服务没有开启,进入网页的管理界面尝试重启ssh,提示失败,无法重启,

    报错 Privilege separation user sshd does not exist

    2》解决Privilege separation user sshd does not exist
    百度找到方法 :
    修改/etc/passwd文件中的内容
    sshd❌74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
    其中/var/empty/sshd修改为你自己的sshd所在目录,默认一般是/usr/local/sbin/sshd
    根据此方法修改 还是无法启动ssh,重启服务器,结果报错:
    Enabling /etc/fstab swaps: [ok]

    telinit:Did not receive a reply.Possible causes include:the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. the rinit: rcS post-stop process terminated with status 1

    系统无法启动
    3》阿里下工单反馈是:
    最后给的原因是:系统更新了内核。。。。

    原因 libcnss-2.12.so 这个文件不存在,从其他机器上拷贝了一个。 这个文件属于glibc。
    然后是新的内核启动无任何提示,使用旧的内核启动成功了,修改了内核启动顺序,暂时将机器起来了, 如果想使用新内核,可以再尝试
    yum install kernel ,如果失败使用yum reinstall kernel 重新安装内核

    莫名的伤痛。。。根本没敢更新内核 结果这么一下。。。

    服务器恢复后重新mount数据盘。启动服务一切恢复正常,真是太狗血了。。。

  • 相关阅读:
    rocketmq 修改broker和namesrv默认设置的堆内存大小
    linux 向文件中添加内容 sed
    页面 请求错误总结
    将pgsql中的所有表的序列当前值设置为所需的值
    pg 强制断开连接 删库
    测试的基本概念
    Linking(3)
    Linking(1)
    Linking(2)
    Nginx Learning (5)
  • 原文地址:https://www.cnblogs.com/jctt-junchi/p/14024669.html
Copyright © 2011-2022 走看看