ssh报错:Could not load host key:/etc/ssh/ssh_host_rsa_key&ssh_host_ecdsa_key&ssh_host_ed25519_key

今天ssh远程的时候发现无法远程,登录主机查看ssh服务状态,报错如下

去查看秘钥

发现文件大小为0,看起来是生成秘钥失败了才导致的故障,解决方法简单,删除原有的秘钥,重新生成秘钥就OK了

然后重启ssh服务,自动生成新的秘钥就可以了

或者也可以通过命令行重新生成相应秘钥

ssh-keygen -t ras -b 2048 -f /etc/ssh/ssh_root_rsa_key
ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen -t ed25519 -b 256 -f /etc/ssh/ssh_host_ed25519_key

ssh报错:Could not load host key:/etc/ssh/ssh_host_rsa_key&ssh_host_ecdsa_key&ssh_host_ed25519_key

时间: 2024-08-09 22:02:13

ssh报错:Could not load host key:/etc/ssh/ssh_host_rsa_key&ssh_host_ecdsa_key&ssh_host_ed25519_key的相关文章

启动ssh服务时,提示Could not load host key: /etc/ssh/ssh_host_rsa_key

在启用 ssh 服务时,有时会看到如下提示: [email protected]:~# /etc/init.d/ssh start* Starting OpenBSD Secure Shell server sshd                                   Could not load host key: /etc/ssh/ssh_host_rsa_keyCould not load host key: /etc/ssh/ssh_host_dsa_key 有两个提示

freebsd Could not load host key: /etc/ssh/ssh_host_dsa_key

刚装好 freebsd 时.用putty登陆,出现Could not load host key: /etc/ssh/ssh_host_dsa_key 这种原因是ssh server没有开启. 开启ssh: 解决办法:  /etc/rc.conf 加入 sshd_enable=”YES” 启动sshd /etc/rc.d/sshd start 附:freebsd ssh 出现的一些问题(转) 记得修改完配置文件后,重新启动sshd服务器(/etc/rc.d/sshd restart)即可. 几点

TortoiseGit Push报错 “Couldn't load this key(unable to open file)” 解决

TortoiseGit 在push时总报"Couldn't load this key(unable to open file)"的错误,导致无法提交 解决方案: 打开工程git目录下的config文件,发现私钥文件的路径的错误的 重新指定一下即可. TortoiseGit Push报错 "Couldn't load this key(unable to open file)" 解决 原文地址:https://www.cnblogs.com/beeasy/p/835

mac系统idea开发工具git -push 报错:no matching host key type found. Their offer: ssh-dss

原因: 根本原因之所以报错是因为OpenSSH7.0以后的版本不再支持ssh-dss(DSA)算法,官方的说法是这个算法太弱了.MACOS升到10.12附带的openssh版本是7.4,如下:?~sshd-Vsshd:illegaloption--VOpenSSH_7 解决方案: 命令行里添加选项 ssh -oHostKeyAlgorithms=+ssh-dss [email protected] 添加 HostKeyAlgorithms +ssh-dss到配置 ~/.ssh/config 原文

[转] Linux有问必答:如何修复“sshd error: could not load host key”

编译自:http://ask.xmodulo.com/sshd-error-could-not-load-host-key.html作者: GOLinux 本文地址:https://linux.cn/article-4226-1.html -重新生成SSH主机密钥54% 问题:当我尝试SSH到一台远程服务器时,SSH客户端登陆失败并提示"Connection closed by X.X.X.X".在SSH服务器那端,我看到这样的错误消息:"sshd error: could

could not load host key

could not load host key 因需要,克隆一虚拟机.可是克隆的虚拟机死活连不上xhell显示如下. 最先以为是iptables防火墙阻止了,结果防火墙没有发现任何规则.于是翻看日志,显示如下 密钥加载失败,没有权限.于是乎,切换到/etc/ssh文件下下面.发现权限正常,密钥文件存在.于是,就将三个密钥重新生成一遍.瞬间满血复活. ssh-keygen -t rsa -f ssh_host_rsa_key 接下来将其他保存的密钥全部重新生成一次. ssh-keygen -t e

Svn启动窗口报错 Could not load file or assembly 'SharpSvn.dll' or one of its

win10 64位系统生成没问题,测试都没问题,结果换到win7 64位系统上,点开就出现,网上搜了下,通过以下方式解决, 必须把bin 文件夹全部删除,重新生成.要不还是会报错. Solve it. Change my platform to x86 Output path to "bin\" Downloaded the x86 of SharpSVN (1.7008.2243.14245) Add SharpSVN.dll in GAC. Delete the bin folde

navicat 连接Oracle 报错:Cannot load OCI DLL, 126

1.64位win7 安装了oracle11g 使用Navicat for Oracle cannot load OCI DLL,126 解决方法:navicat 菜单中 -工具->选项->OCI 选择Oracle安装目录下bin里面的oci.dll 但是发现还是报错. Cannot load OCI DLL, 126: Instant Client package is required for Baic and TNS connection ,For more information: ht

Eclipse启动 报错[Failed to load the JNI shared library jvm.dll

准备要做java服务器,在安装开发环境时,启动Eclipse报错[Failed to load the JNI shared library jvm.dll] 研究了下,造成错误的原因是由于eclipse与jdk的不一致造成的. 我的开发环境是64位windows8 Pro,安装了64位jdk1.6,eclipse却粗物的安装了32位的版本,由于64位和32位匹配不一致,造成了以上错误的发生. 又尝试了一下,32位jdk+64位eclipse也会发生同样的问题. 好了,解决方法很简单,jdk和e