栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Linux系统上SSH无法启动

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux系统上SSH无法启动

在机器上直接登录,问题显示如下:

 

/var/empty/sshd must be owned by root and not group or world-writable.

 

问题:

 

Linux上的SSH无法启动

报告/var/empty/sshd must be owned by root and not group or world-writable.

 

解决办法:

 

首先通过物理终端进入到linux上,手工检查ssh发现没运行

-bash-2.05b# /etc/init.d/sshd status

sshd is stopped

 

手工启动服务,发现报告权限错误。

-bash-2.05b# /etc/init.d/sshd start

Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.

[FAILED]

-bash-2.05b#

 

使用rpm -V 命令可检查到ssh的软件包正常,但某个目录的属主错误。

-bash-2.05b# rpm -V openssh-server

S.5..... c /etc/ssh/sshd_config

.....U.. /var/empty/sshd

-bash-2.05b#

 

经查看发现这个目录的属主不是root,所以启动ssh报错

-bash-2.05b# ls -ld /var/empty/sshd/

d--x--x--x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/

-bash-2.05b#

 

修改为root属主,启动成功

-bash-2.05b# chown root /var/empty/sshd/

-bash-2.05b# /etc/init.d/sshd start

Starting sshd: [ OK ]

-bash-2.05b#

 

至此问题修复。

 

另外,还可以尝试:

 

这个是权限的问题

可采取以下两步解决

chown -R root.root /var/empty/sshd

chmod 744 /var/empty/sshd

service sshd restart

就可以解决上述的问题。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/212232.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号