connection closed by foreign host / Permissions 0620 for '/etc/ssh/ssh_host_ed25519_key' are too open 解决方案
发生此次故障的原因:
在文件夹授权时 错误的执行了 chmod -R 755 /
本来只想授权当前文件夹的 结果...
然后就导致xshell连不上了 懵逼...
解决方案 将权限收回:
执行: chmod -R 600 /etc/ssh/
重启: systemctl status sshd.service
以下是解决问题时的一些关键字:
[root@iZ2vcdtfg9o3j8bu9odeqyZ server]# systemctl restart sshd
Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details.
[root@iZ2vcdtfg9o3j8bu9odeqyZ server]# systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2019-09-11 10:26:32 CST; 5s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 24730 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=1/FAILURE)
Main PID: 24730 (code=exited, status=1/FAILURE)
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24730]: Permissions 0620 for '/etc/ssh/ssh_host_ed25519_key' are too open.
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24730]: It is required that your private key files are NOT accessible by others.
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24730]: This private key will be ignored.
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24730]: key_load_private: bad permissions
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24730]: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24730]: sshd: no hostkeys available -- exiting.
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ systemd[1]: sshd.service: main process exited, code=exited, status=1/FAILURE
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ systemd[1]: Failed to start OpenSSH server daemon.
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ systemd[1]: Unit sshd.service entered failed state.
Sep 11 10:26:32 iZ2vcdtfg9o3j8bu9odeqyZ systemd[1]: sshd.service failed.
[root@iZ2vcdtfg9o3j8bu9odeqyZ server]# chmod -R 600 /etc/ssh/
[root@iZ2vcdtfg9o3j8bu9odeqyZ server]# systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-09-11 10:27:14 CST; 436ms ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 24735 (sshd)
CGroup: /system.slice/sshd.service
└─24735 /usr/sbin/sshd -D
Sep 11 10:27:14 iZ2vcdtfg9o3j8bu9odeqyZ systemd[1]: Starting OpenSSH server daemon...
Sep 11 10:27:14 iZ2vcdtfg9o3j8bu9odeqyZ sshd[24735]: Server listening on 0.0.0.0 port 10022.
Sep 11 10:27:14 iZ2vcdtfg9o3j8bu9odeqyZ systemd[1]: Started OpenSSH server daemon.
connection closed by foreign host / Permissions 0620 for '/etc/ssh/ssh_host_ed25519_key' are too open 解决方案的更多相关文章
- XShell提示Connection closed by foreign host的问题 和 路由器分配IP的规则
情况是这样的: VMware中有三个Linux机器分别是crxy99(192.168.1.99),crxy100(192.168.1.100),crxy101(192.168.1.101),crxy1 ...
- Escape character is '^]'. Connection closed by foreign host.
今天在用易汇金的接口回调时候,老是回调不到我的机器上面.我的ip通过公网映射,按说是可以访问到我的ip,思考是什么问题. 1.防火墙关闭,不行 2.防火墙开启,但是把自己的端口号改为可以访问(参考:h ...
- 关于xshell:Connection closed by foreign host
因为原来系统网有时掉,有时卡(同局域网别人没事),重新做了系统. 装了xmanager3,在用xshell连接linux服务器时,提示:服务器发送了一个无效的密钥,然后输出:Connection cl ...
- telnet出现Connection closed by foreign host
2018-10-26 执行命令: telnet smtp.exmail.qq.com 出现信息: [root@pengman Desktop]# telnet Tring Connected to 1 ...
- XShell 连接虚拟机中的服务器 失败 、连接中断(Connection closed by foreign host.)
在使用XShell连接虚拟机中的服务器时,报以下错误并断开连接,之前连接还是挺稳定的,忽然就这样了 Last login: Thu Aug :: from 192.168.1.102 [root@no ...
- xshell连接不了虚拟机处理方法(错误提示:Connection closing...Socket close.Connection closed by foreign host.Disconnected from remote host(localhost) at 08:47:23.)
一.问题描述:xshell连接不了虚拟机,出现错误提示:Connection closing...Socket close.Connection closed by foreign host.Disc ...
- 解决 SSH Connection closed by foreign host 问题
Xshell 报错 : 1.有可能是IP和别人冲突,改一下IP就好了 2.也有可能是文件权限的问题.改一下: cd /etc/ssh/ chmod ssh_host_* chmod *.pub 3.也 ...
- linux篇-xshell连接突然报Connection closed by foreign host.
1问题描述报错 Connection closed by foreign host. Disconnected from remote host(yaoGS) at 155513. 2登入虚拟机 在l ...
- Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host(centos6.9) at 14:59:05.
查找网上资料解决方法如下 [root@localhost ssh]# service sshd start Starting sshd: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
随机推荐
- drf中的jwt使用与手动签发效验
jwt认证 1)session存储token,需要数据库参与,耗服务器资源.低效 2)缓存存token,需要缓存参与,高效,不易集群 3)客户端存token,服务器存签发与交易token的算法,高效, ...
- 修改xampp中phpmyadmin用户管理
用相关软件打开位于D:/xampp/phpMyAdmin文件夹中的config.inc.php文件. 搜索$cfg['Servers'][$i]['auth_type'] = 'config'; 将其 ...
- 剑指CopyOnWriteArrayList
上期回顾 之前的一篇 剑指ConcurrentHashMap[基于JDK1.8] 给大家详细分析了一波JUC的ConcurrentHashMap,它在线程安全的基础上提供了更好的写并发能力.那么既然有 ...
- Java8-19-lambda 重构代码
通过本书的前七章,我们了解了Lambda和Stream API的强大威力. 你可能主要在新项目的代码中使用这些特性.如果你创建的是全新的Java项目,这是极好的时机,你可以轻装上阵,迅速地将新特性应用 ...
- mongodb写入安全级别
MongoDB的写安全机制 写入安全(Write Concern)是一种由客户端设置的,用于控制写入安全级别的机制,通过使用写入安全机制可以提高数据的可靠性. MongoDB提供四种写入级别,分别是: ...
- JQuery之选择器篇(一)
今天回顾了之前学习的JQuery选择器,现在简单的总结一下. JQuery选择器类型 主要分为四类 基本选择器 层级选择器 过滤选择器 表单选择器 基本选择器 基本选择器是jQuery中最 ...
- 牛奶别乱喝6种最好最差牛奶PK
牛奶被认为是最健康的一种食材,而且牛奶柔滑的口感和味道让地球上的每一个人都爱不释口.随着现代工业的发展,牛奶也被加工成各种各样的制品,即便是牛奶本身也有着无数的选择,那么究竟什么样的牛奶好.什么样 ...
- js案例之使用正则表达式进行验证数据正确性
#js案例之使用正则表达式进行验证数据正确性 代码上传至 "GitHub" 样例: <tr> <td>密码:</td> <td> & ...
- JAVA基础之IO流知识总结
一.IO流体系图 IO常用的几个流: [I/O流原理作用] Input/Output:输入输出机制 输入机制:允许java程序获取外部设备的数据(磁盘,光盘,网络等). 输出机制:保留java程序中的 ...
- Python 【面向对象】
前言 Python从设计之初就已经是一门面向对象的语言,正因为如此,在Python中创建一个类和对象是很容易的.本章节我们将详细介绍Python的面向对象编程. 如果你以前没有接触过面向对象的编程语言 ...