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: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
随机推荐
- [洛谷P4777] [模板] 扩展中国剩余定理
扩展中国剩余定理,EXCRT. 题目传送门 重温一下中国剩余定理. 中国剩余定理常被用来解线性同余方程组: x≡a[1] (mod m[1]) x≡a[2] (mod m[2]) ...... x≡a ...
- 吴裕雄--天生自然python编程:实例(3)
# 返回 x 在 arr 中的索引,如果不存在返回 -1 def binarySearch (arr, l, r, x): # 基本判断 if r >= l: mid = int(l + (r ...
- <USACO09JAN>气象测量/气象牛The Baric Bovineの思路
我..莫名其妙搞出来的 随便搞搞..幻想中的dp结果对了 我也很迷茫 Description 为了研究农场的气候,Betsy帮助农夫John做了N(1 <= N <= 100)次气压测量并 ...
- JMeter之BeanShell断言---equals使用
判断变量是否为root if(!"${User}".equals("root")){ Failure=true; FailureMessage="ER ...
- Laravel Study(使用 Laravel )
開始 伺服器及相關工具安裝自行建立,在伺服器跟目錄下 有兩種方式建立 Laravel 專案,這裡使用 composer 建立專案 使用 composer 要在 PHP 5.3.2 以上才能使用 com ...
- Autowired和Resource区别
@Autowired和@Resource熟悉吧?是不是经常复制粘贴顺手就来,两者都是用来给成员变量自动装载,可是它俩到底有啥区别呢? 1.@Autowired与@Resource都可以用来装配bean ...
- 名企6年Java程序员的工作感悟,送给迷茫的你
程序员从开始选择到坚持下去,工作了六年对一个程序员意味什么?在职位上:高级开发工程师?架构师?技术经理?or ... ?在能力上:各种编码无压力?核心代码无压力?平台架构无压力? or ... fuc ...
- Java面试必问之Hashmap底层实现原理(JDK1.7)
1. 前言 Hashmap可以说是Java面试必问的,一般的面试题会问: Hashmap有哪些特性? Hashmap底层实现原理(get\put\resize) Hashmap怎么解决hash冲突? ...
- 7-11 jmu-python-分段函数&数学函数 (15 分)
本题要求计算下列分段函数f(x)的值(x为从键盘输入的一个任意实数): 输入格式: 直接输入一个实数x 输出格式: 在一行中按“f(x)=result”的格式输出,其中x与result都保留三位小数. ...
- 带你入门 CSS Grid 布局
前言 三月中旬的时候,有一个对于 CSS 开发者来说很重要的消息,最新版的 Firefox 和 Chrome 已经正式支 CSS Grid 这一新特性啦.没错:我们现在就可以在最流行的两大浏览器上玩转 ...