2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > linux系统ssh服务无法启动 Linux上的SSH无法启动

linux系统ssh服务无法启动 Linux上的SSH无法启动

时间:2023-02-16 09:08:10

相关推荐

linux系统ssh服务无法启动 Linux上的SSH无法启动

问题

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 /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#

至此问题修复。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。