当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux操作系统上SSH无法启动解决办法

Unix/Linux
fedora 9.0 添加新到yum源和fastestmirror插件
Fedora 9.0 详细安装图解
Fedora 10 安装教程全程图解推荐
Linux系统通过手机GPRS无线上网
手动编译安装Linux网卡驱动
取消挂载 umount 时出现的 “Device is busy”
linux系统挂载光盘镜像ISO的方法
yum安装命令的使用方法
linux echo命令说明
etc/profile环境变量配置解析
Linux系统下ifconfig命令使用说明
putty乱码的解决办法
putty连接linux乱码的解决办法
linux 下Apache设置与优化
linux操作系统下 RAR的安装和使用
linux服务器安全小知识
LINUX系统一个网卡绑定多个IP的方法
Linux用软件实现RAID 的方法
linux一些小技巧
Linux下调整网卡的工作模式

Unix/Linux 中的 Linux操作系统上SSH无法启动解决办法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 66 ::
收藏到网摘: n/a

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

 

/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

就可以解决上述的问题。