美文网首页Linux
error: Unable to load host key:

error: Unable to load host key:

作者: 与狼共舞666 | 来源:发表于2021-12-15 10:09 被阅读0次
[sysadmin@client-proxy-02 ~]$ sudo systemctl status sshd
● sshd.service - SYSV: OpenSSH server daemon
   Loaded: loaded (/etc/rc.d/init.d/sshd; bad; vendor preset: enabled)
   Active: active (running) since Sun 2021-11-14 19:53:00 EST; 4 weeks 2 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1035 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=0/SUCCESS)
 Main PID: 1064 (sshd)
   CGroup: /system.slice/sshd.service
           └─1064 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups

Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: Unable to load host key: /etc/ssh/ssh_host_rsa_key
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: Permissions 0640 for '/etc/ssh/ssh_host_ecdsa_key' are tooopen.
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: It is required that your private key files are NOT accessible by others.
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: This private key will be ignored.
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: Unable to load host key "/etc/ssh/ssh_host_ecdsa_key": badpermissions
Dec 14 20:57:57 client-proxy-02 sshd[23139]: error: Unable to load host key: /etc/ssh/ssh_host_ecdsa_key
Dec 14 20:57:58 client-proxy-02 sshd[23139]: Accepted password for sysadmin from 10.98.201.10 port 53036 ssh2

解决办法:把/etc/ssh/ssh_host_ecdsa_key、/etc/ssh/ssh_host_rsa_key 权限改成600

相关文章

网友评论

    本文标题:error: Unable to load host key:

    本文链接:https://www.haomeiwen.com/subject/qjwufrtx.html