Permissions 0715 for ‘/etc/ssh/ssh_host_rsa_key‘ are too open


cat /var/log/message # 查看日志报告一下错误
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: Permissions 0715 for '/etc/ssh/ssh_host_rsa_key' are too open.
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: It is required that your private key files are NOT accessible by others.
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: This private key will be ignored.
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: key_load_private: bad permissions
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: Permissions 0715 for '/etc/ssh/ssh_host_ecdsa_key' are too open.
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: It is required that your private key files are NOT accessible by others.
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: This private key will be ignored.
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: key_load_private: bad permissions
May 12 15:14:33 host-10-69-15-70 sshd[4906]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key

# 总结 只要出现这种错误  

Permissions 0715 for '/etc/ssh/ssh_host_ecdsa_key' are too open.

没别的  就是  密码类linux文件给的权限太高了 肯定是个菜鸟干的

# 查看 报错服务器ssh下面文件

ll /etc/ssh
total 604
-rwxr-xr-x. 1 root root     581843 Apr 11  2018 moduli
-rwxr-xr-x. 1 root root       2276 Apr 11  2018 ssh_config
-rwxr-xr-x  1 root root       3907 May 12 14:56 sshd_config
-rw-------. 1 root ssh_keys    227 Dec 28 14:11 ssh_host_ecdsa_key
-rwxr-xr-x. 1 root root        162 Dec 28 14:11 ssh_host_ecdsa_key.pub
-rw-r-----  1 root ssh_keys    387 May 12 15:02 ssh_host_ed25519_key
-rw-r--r--. 1 root root         82 May 12 15:02 ssh_host_ed25519_key.pub
-rwxr-xr-x. 1 root ssh_keys   1675 Dec 28 14:11 ssh_host_rsa_key
-rwxr-xr-x. 1 root root        382 Dec 28 14:11 ssh_host_rsa_key.pub

# 正常 服务器 ssh下面文件的权限

ll /etc/ssh
total 604
-rw-r--r--. 1 root root     581843 Apr 11  2018 moduli
-rw-r--r--. 1 root root       2276 Apr 11  2018 ssh_config
-rw-------. 1 root root       3907 Apr 11  2018 sshd_config
-rw-r-----. 1 root ssh_keys    227 Dec 28 14:11 ssh_host_ecdsa_key
-rw-r--r--. 1 root root        162 Dec 28 14:11 ssh_host_ecdsa_key.pub
-rw-r-----. 1 root ssh_keys    387 Dec 28 14:11 ssh_host_ed25519_key
-rw-r--r--. 1 root root         82 Dec 28 14:11 ssh_host_ed25519_key.pub
-rw-r-----. 1 root ssh_keys   1675 Dec 28 14:11 ssh_host_rsa_key
-rw-r--r--. 1 root root        382 Dec 28 14:11 ssh_host_rsa_key.pub

# 解决办法  重新授权 为 600即可  或者先直接删除报错文件

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值