SecureCRT远程连接The remote system refused the connection问题
今天用SecureCRT远程连接Linux(Centos 7)时,连不上,报错The remote system refused the connection.
于是就百度,首先查看sshd服务有没有启动
只有ssh-agent,于是去启动sshd
执行如下命令cd /etc/init.d
systemctl restart sshd.service
没有成功,报错Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details.
。
再使用这个命令journalctl -xe
看错误信息,具体报错信息如下。
[root@localhost ssh]# systemctl restart sshd.service
Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details.
[root@localhost ssh]# journalctl -xe
12月 05 10:45:01 localhost.localdomain sshd[11508]: Permissions 0715 for '/etc/ssh/ssh_host_rsa_key' are too open.
12月 05 10:45:01 localhost.localdomain sshd[11508]: It is required that your private key files are NOT accessible by others.
12月 05 10:45:01 localhost.localdomain sshd[11508]: This private key will be ignored.
12月 05 10:45:01 localhost.localdomain sshd[11508]: key_load_private: bad permissions
12月 05 10:45:01 localhost.localdomain sshd[11508]: Could not load host key: /etc/ssh/ssh_host_rsa_key
12月 05 10:45:01 localhost.localdomain sshd[11508]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12月 05 10:45:01 localhost.localdomain sshd[11508]: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
12月 05 10:45:01 localhost.localdomain sshd[11508]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12月 05 10:45:01 localhost.localdomain sshd[11508]: Permissions 0715 for '/etc/ssh/ssh_host_ecdsa_key' are too open.
12月 05 10:45:01 localhost.localdomain sshd[11508]: It is required that your private key files are NOT accessible by others.
12月 05 10:45:01 localhost.localdomain sshd[11508]: This private key will be ignored.
12月 05 10:45:01 localhost.localdomain sshd[11508]: key_load_private: bad permissions
12月 05 10:45:01 localhost.localdomain sshd[11508]: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
12月 05 10:45:01 localhost.localdomain systemd[1]: sshd.service: main process exited, code=exited, status=1/FAILURE
12月 05 10:45:01 localhost.localdomain sshd[11508]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12月 05 10:45:01 localhost.localdomain sshd[11508]: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
12月 05 10:45:01 localhost.localdomain sshd[11508]: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12月 05 10:45:01 localhost.localdomain sshd[11508]: Permissions 0715 for '/etc/ssh/ssh_host_ed25519_key' are too open.
12月 05 10:45:01 localhost.localdomain sshd[11508]: It is required that your private key files are NOT accessible by others.
12月 05 10:45:01 localhost.localdomain sshd[11508]: This private key will be ignored.
12月 05 10:45:01 localhost.localdomain sshd[11508]: key_load_private: bad permissions
12月 05 10:45:01 localhost.localdomain sshd[11508]: Could not load host key: /etc/ssh/ssh_host_ed25519_key
12月 05 10:45:01 localhost.localdomain sshd[11508]: sshd: no hostkeys available -- exiting.
12月 05 10:45:01 localhost.localdomain systemd[1]: Failed to start OpenSSH server daemon.
-- Subject: Unit sshd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sshd.service has failed.
--
-- The result is failed.
12月 05 10:45:01 localhost.localdomain systemd[1]: Unit sshd.service entered failed state.
12月 05 10:45:01 localhost.localdomain systemd[1]: sshd.service failed.
12月 05 10:45:01 localhost.localdomain polkitd[7760]: Unregistered Authentication Agent for unix-process:11502:197209 (system bus name :1.14
lines 1492-1525/1525 (END)
看到很多Permissions
这个词,权限。
诸如;Permissions 0715 for '/etc/ssh/ssh_host_rsa_key' are too open.
key_load_private: bad permissions
的错,这是一些密钥文件,也就是说没有权限访问这几个文件,可我用的root啊也没权限,奇怪了。
那么我们看看这三个文件现在的权限是什么。切到/etc/ssh
下ll
查看,这三个文件的权限是755,感觉没啥问题啊。继续百度吧。
搜了好久,有篇博文说执行这个命令chmod 600 /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key
也就是修改这个三个文件的权限为600
再执行systemctl restart sshd.service
重启sshd服务
再查看是否启动,果然起来了。
再用SecureCRT连接就连上了。
太曲折了。期间还执行了sudo yum install openssh-server
安装ssh服务,修改了ifcfg-eth0,centos没有这个文件只有ifcfg-ens33,不知有用没,还有查看端口的、/etc/ssh/sshd_config文件的Post是不是22等等。最后终于解决了。
SecureCRT远程连接The remote system refused the connection问题的更多相关文章
- SecureCRT连接Ubuntu报The remote system refused the connection.解决方案
使用SecureCRT连接到远程Ubuntu,连接失败报The remote system refused the connection. 进入Ubuntu系统,终端中敲入以下命令: ps -ef|g ...
- []: secureCRT连接ubuntu问题- The remote system refused the connection
secureCRT连接ubuntu问题- The remote system refused the connection http://jxyang.iteye.com/blog/1484915 解 ...
- secureCRT The remote system refused the connection.解决办法
使用远程登录工具SecureCRT登陆ubuntu的时候遇到了这个问题: secureCRT The remote system refused the connection 这个问题的原因是是Ubu ...
- Ubuntu secuerCRT连接失败,The remote system refused the connection.
新安装的ubuntu系统,securtCRT连接失败,出现下面结果,这是因为ubuntu没有安装工具. The remote system refused the connection. 解决办法: ...
- SecureCRT connecting VM Linux show error message: The remote system refused the connection.
SecureCRT connecting VM Linux show error message: The remote system refused the connection.
- The remote system refused the connection.
使用SecureCRT连接Ubuntu时,报错: The remote system refused the connection. 说明Ubuntu上没有安装openssh-server,使用命令: ...
- secureCRT The remote system refused the connection.
转 http://blog.csdn.net/lifengxun20121019/article/details/13627757 我在实践远程登录工具SecureCRT的时候遇到了这个问题 Ubun ...
- secureCRT The remote system refused the connection问题解决
问题: Ubuntu系统必须开启ssh服务后,XP或者其它的主机才干够远程登陆到Ubuntu系统. 1,安装软件包,运行sudo apt-get install openssh-server Ubun ...
- secure CRT the remote system refused the connection 解决办法
1.安装ssh服务器和客户端 apt-get install openssh-server apt-get install openssh-client 2.重启ssh /etc/init.d/ssh ...
随机推荐
- python20个骚操作
Python小白需要知道的 20 个骚操作! Python 是一个解释型语言,可读性与易用性让它越来越热门.正如 Python 之禅中所述: 优美胜于丑陋,明了胜于晦涩. 在你的日常编码中,以下技巧可 ...
- 普通用户修改时间 sudo
sudo date neokylinV7.0 desktop 1.给/etc/sudoers加权限 # chmod u+w /etc/sudoers 2.添加配置 # vim /etc/sudoer ...
- lvm_lv_extend
根分区lv扩容 xfs格式 neokylinV7.0 [root@localhost ~]# fdisk /dev/vda 欢迎使用 fdisk (util-linux 2.23.2). 更改将停留在 ...
- VUE的中v-if和v-shou的区别
v-if的特点:每次都会重新删除或创建元素 v-shou的特点:每次执行都只是切换了元素的display:none的属性 v-if的缺点: 每次使用都会有较高性能消耗(频繁的切换元素建议不适用,建议使 ...
- 个性的圆角.html
- Java 基于Spire.Cloud.Excel 将Excel转为PDF
Spire.Cloud.Excel Sdk 提供GeneralApi接口和WorkbookApi接口,支持将本地Excel和云端Excel文档转换为ODS, PDF, XPS, PCL, PS等格式. ...
- Kafka 安装配置 及 简单实验记录
1. 下载二进制文件并解压,并修改 broker.id 的值 wget http://apache.fayea.com/kafka/0.10.0.0/kafka_2.10-0.10.0.0.tgz - ...
- GROUP_CONCAT在组合商品中的使用
表:combined_product_item -------------------------pid sku quality-------------------------1 sku1 11 s ...
- Gradle+Groovy基础篇
在Java项目中,有两个主要的构建系统:Gradle和Maven.构建系统主要管理潜在的复杂依赖关系并正确编译项目.还可以将已编译的项目以及所有资源和源文件打包到.war或.jar文件中.对于简单的构 ...
- 手撕 JVM 垃圾收集日志
下图是本篇的写作大纲,将从以下四个方面介绍怎么样处理 JVM 日志. 有准备才能不慌 想要分析日志,首先你得有日志呀,对不对.凡是未雨绸蒙总是没错的.所谓有日志的意思,你要把 JVM 参数配置好,日志 ...