找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 14|回复: 0

MAC下SSH终端报错,清除原有ssh密钥方法

[复制链接]
发表于 2025-7-6 23:09:19 | 显示全部楼层 |阅读模式
随着Mac市场份额不断增加,相信很多新手站长已经在Mac上管理服务器了,不知道大家是否遇到过,当你的远程服务器系统重装之后,Mac终端连接ssh user@服务器IP,输入密码会报错,这个问题如何解决呢?

错误提示如下:
KENFORFORLIN:~ kenforstar$ sudo ssh root@192.168.1.203Password:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host isea:24:31:8d:03:07:36:db:2f:74:15:5d:58:67:a3:5b.
Please contact your system administrator.
Add correct host key in /var/root/.ssh/known_hosts to get rid of this message.
Offending key in /var/root/.ssh/known_hosts:1RSA host key for 192.168.1.203 has changed and you have requested strict checking.
Host key verification failed.

解决方法:打开Mac终端,输入以下命令即可——
  1. ssh-keygen -R IP(你远程服务器ip地址)
复制代码
快乐分享,勿忘提肛!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Mac帮 ( 京ICP备14000430号-10 )

GMT+8, 2025-7-23 07:41 , Processed in 0.074106 second(s), 3 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表