sshd报错status=203/EXEC,/sbin/sshd permission denied

简介: sshd报错status=203/EXEC,/sbin/sshd permission denied

ssh服务连接不上,发现是sshd没有启动,逐步检查问题

# 查看状态码是203
$ service sshd status
status=203/EXEC
# 提示权限不够
$ sshd -t
/sbin/sshd permission denied
# 查看,发现他存在的,看到没有执行权限
$ ls -la /sbin/sshd
-rw-r-xr-x 1 root root 465824 3月  19 2020 /sbin/sshd
# 增加执行权限
$ chmod +x /sbin/sshd
# 重启就行
$ service sshd sart

其他问题

CentOS重启sshd服务会自动生成一部分文件
# 报错提示不能加载文件
Could not load host key: /etc/ssh/ssh_host_ed25519_key
# 创建文件,报错没有类型ed25519
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key
# 通过一下方式创建
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key
# 查看报错
sshd -t
# 权限不对,只能自己可读写
Permission 0644 for are too open
chmod 600 fileName

操作

service sshd start
service sshd stop

以上一顿操作后,还是有问题,最后重装就正常了

service sshd stop
yum remove openssh -y
yum install openssh openssh-server openssh-clients -y
service sshd start

参考

sshd启动失败,一直重启

相关文章
|
2月前
|
网络协议 Linux
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
141 3
|
7月前
|
关系型数据库 MySQL
启动mysql时报错"/etc/init.d/mysqld: Permission denied"
请谨慎操作,并根据你的具体情况选择适当的解决方法。如果问题仍然存在,你可能需要查看MySQL的文档或寻求进一步的支持。
437 1
|
安全 关系型数据库 MySQL
mysqld: Can‘t read dir of ‘/etc/mysql/conf.d/‘ (Errcode: 13 - Permission denied)
mysqld: Can‘t read dir of ‘/etc/mysql/conf.d/‘ (Errcode: 13 - Permission denied)
706 2
|
网络安全
无法启动ssh:/run/sshd must be owned by root and not group or world-writable.
无法启动ssh:/run/sshd must be owned by root and not group or world-writable.
379 0
无法启动ssh:/run/sshd must be owned by root and not group or world-writable.
|
网络安全 开发工具 git
错误解决办法:exec /usr/lib/ssh/ssh-askpass : No such file or directory error.
错误解决办法:exec /usr/lib/ssh/ssh-askpass : No such file or directory error.
294 0
sshd报错status=203/EXEC,/sbin/sshd permission denied
sshd报错status=203/EXEC,/sbin/sshd permission denied
247 0
|
Linux Python 网络安全
ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=1/FAILURE)
firewalld启动报错ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=1/FAILURE)
4442 0