SecureCRT远程连接The remote system refused the connection问题
今天用SecureCRT远程连接Linux(Centos 7)时,连不上,报错The remote system refused the connection.
于是就百度,首先查看sshd服务有没有启动
只有ssh-agent,于是去启动sshd
执行如下命令cd /etc/init.dsystemctl 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 ...
随机推荐
- jQuery.hasClass() 函数详解
jQuery.hasClass() 函数详解 hasClass()函数用于指示当前jQuery对象所匹配的元素是否含有指定的css类名. 该函数属于jQuery对象(实例). 语法 JavaScrip ...
- Zip压缩工具、tar打包、打包并压缩
第5周第2次课(4月17日) 课程内容: 6.5 zip压缩工具6.6 tar打包6.7 打包并压缩 6.5 zip压缩工具 Zip压缩工具最大的特点就是可以支持压缩目录,也能够压缩文件,Window ...
- ThinkPHP 实现数据库事务回滚示例代码
ThinkPHP提供了数据库的事务支持,如果要在应用逻辑中使用事务,可以参考下面的方法: 启动事务: $User->startTrans(); 提交事务: $User->commit( ...
- ThinkPHP5——route(路由)的详解
路由在框架中的作用打个比方的话,路由好比是WEB应用的总调度室,对于访问的URL地址,路由可以拒绝或者接受某个URL请求,并进行分发调度,而且还有一个副作用是因为路由规则可以随意定义,因此可以让你的U ...
- Multi-Camera Coordination and Control in Surveillance Systems: A Survey 阅读笔记
原文: Natarajan, Prabhu, Pradeep K. Atrey, and Mohan Kankanhalli. "Multi-camera coordination and ...
- OS_Architecture_MemoryHierarchy
Hit: if the data CPU is looking for can not be found in a cache, it constitutes a hit. Miss: cache m ...
- ASP.NET Core 选项模式源码学习Options Configure(一)
前言 ASP.NET Core 后我们的配置变得更加轻量级了,在ASP.NET Core中,配置模型得到了显著的扩展和增强,应用程序配置可以存储在多环境变量配置中,appsettings.json用户 ...
- markdown使用方法介绍
markdown使用方法介绍 最近在更新微信公众号的时候发现有很多格式无法编辑尤其是涉及到代码的,每次都要截图贴上去,费时费力.穷则生变,研究了markdown格式,果然豁然开朗,一片新的天地瞬间打开 ...
- MySQL必知必会(Select, Where子句)
SELECT prod_name, prod_price FROM products WHERE prod_price = 2.5; SELECT prod_name, prod_price FROM ...
- asp.net core中间件工作原理
不少刚学习.net core朋友对中间件的概念一直分不清楚,到底StartUp下的Configure方法是在做什么? public void Configure(IApplicationBuilder ...