[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
网友评论