【无标题】

当尝试SSH连接远程主机时,如果服务器重装系统导致Hostkey改变,会出现连接失败的错误。解决这个问题可以使用ssh-keygen-R命令删除旧的主机键,然后建立新的连接。这样能允许你用更新后的Hostkey正常SSH登录远程服务器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

服务器重装系统后,再次连接报错:

报错:

```powershell
Host key  has changed and you have requested strict checking. 
Host key verification failed.

This error typically occurs when you try to SSH into a remote host, and the host key on the remote server has changed since the last time you connected to it. You can resolve this issue by using the following command:

解决方法:

ssh-keygen -R <hostname or IP address>

This command removes the old host key associated with the remote server and allows you to establish a new connection with the updated host key. You can then SSH into the remote server as usual.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值