现场1台H3C 6530交换机
从这台交换机上SSH登录1台思科设备时,报错如下:
<H3C-SWITCH> ssh 10.248.1.250
Username: admin1
Press CTRL+C to abort.
Connecting to 10.248.1.250 port 22.
The server's host key does not match the local cached key. Either the server administrator has changed the host key, or you connected to another server pretending to be this server. Please remove the local cached key, before logging in!
查询得知是H3C上缓存的key变化导致了
需要清理掉对应Ip的key
命令:
[H3C-SWITCH]delete ssh client server-public-key server-ip 10.248.1.250
清理完成后,再次登录正常
<H3C-SWITCH>ssh 10.248.1.250
Username: admin1
Press CTRL+C to abort.
Connecting to 10.248.1.250 port 22.
The server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:Y //这一步可以输入N,这样的话H3C就不保存key
Enter a character ~ and a dot to abort.
(Cisco Controller)
User: admin
Password:********
(Cisco Controller) >
(Cisco Controller) >
(Cisco Controller) >
```bash