记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。


在centos7上制作好openssh-8.2p1的RPM安装包后,直拉使用rpm -Uvh *.rpm 升级后,

发现重启ssh服务失败,查看报错如下: Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.

具体操作如下,修改权限后,ssh工作正常。

[root@oracle12cdb x86_64]# service sshd restart

Restarting sshd (via systemctl):  Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details.
                                                           [FAILED]
[root@oracle12cdb x86_64]#
[root@oracle12cdb x86_64]#
[root@oracle12cdb x86_64]# systemctl status sshd.service
● sshd.service - SYSV: OpenSSH server daemon
   Loaded: loaded (/etc/rc.d/init.d/sshd; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since 四 2020-04-30 14:24:55 CST; 10s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 56829 ExecStop=/etc/rc.d/init.d/sshd stop (code=exited, status=0/SUCCESS)
  Process: 56968 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=1/FAILURE)
 Main PID: 56559 (code=exited, status=0/SUCCESS)

4月 30 14:24:55 oracle12cdb.cn sshd[56968]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
4月 30 14:24:55 oracle12cdb.cn sshd[56968]: Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.
4月 30 14:24:55 oracle12cdb.cn sshd[56968]: It is required that your private key files are NOT accessible by others.
4月 30 14:24:55 oracle12cdb.cn sshd[56968]: This private key will be ignored.
4月 30 14:24:55 oracle12cdb.cn sshd[56968]: sshd: no hostkeys available -- exiting.
4月 30 14:24:55 oracle12cdb.cn systemd[1]: sshd.service: control process exited, code=exited status=1
4月 30 14:24:55 oracle12cdb.cn sshd[56968]: [FAILED]
4月 30 14:24:55 oracle12cdb.cn systemd[1]: Failed to start SYSV: OpenSSH server daemon.
4月 30 14:24:55 oracle12cdb.cn systemd[1]: Unit sshd.service entered failed state.

4月 30 14:24:55 oracle12cdb.cn systemd[1]: sshd.service failed.


[root@oracle12cdb x86_64]# chmod 600 /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key
[root@oracle12cdb x86_64]# service sshd restart
Restarting sshd (via systemctl):                           [  OK  ]
[root@oracle12cdb x86_64]#



转载请标明出处【centos7 升级openssh-8.2p1后,Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论