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

Unix/Linux
linux查看内存的大小
在linux下写的代码,用的是utf-8,结果拿到XP下运行的时候,所有的中文都成乱码
linux su和sudo命令的区别
linux cron 下的定时执行工具使用技巧
linux 查找进程及终止进程操作的相关命令
redhat linux 安装 gcc编译器
Linux Mplayer播放各种格式的电影
一起回顾一下linux常用命令
Linux 网站项目发布要做哪些配置
linux SSH配合SecureCRT的密匙完美使用方法
GD 编译出错解决方法
Facebook Open Platform编译FAQ
Linux 系统硬盘 优化
linux 挂载详解
linux crontab定时命令
Linux 系统中确保访问三级域名畅通的方法
Linux 特权帐号VS普通帐号
确保Linux系统安全的前提条件 漏洞防护
Linux 监视系统资源使用率
Red Hat Linux上使用BIND建立DNS服务器

Unix/Linux 中的 Linux系统上SSH无法启动


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 33 ::
收藏到网摘: 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

就可以解决上述的问题。