# 5.交换机作为SSH客户端登录出错

使用华三交换机作为ssh客户端登录其他设备，报错如下,提示设备本地保存的密钥和对方返回的密钥不同，

```
<H3C> ssh 192.168.1.1
Username: admin
Press CTRL+C to abort.
Connecting to 192.168.1.1 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!
```

### 1.查看本地保存到密钥

```
[H3C]display ssh client server-public-key 
 Server address: 192.168.1.1
 Key type: rsa
 Key length: 1024
 Key code:
   AAAAB3SDEFASe2^&^FSPODSNAAAgQDPyZwexaYdGOk0U9npokGQcA3gdPj7dTkL
   cruATInJMq46NWh0BHsdsdfdsgdT&K@F(EDADSFAFDIY+zRN+8mZt2x6fOIP3r
   uZUHcow74L3IdJLnFjLK9hDX2iG0TZC17+1C1qHQHN2lCX5dhnFVhSGdxrjK9Z0j
   4EXhXjQ4ww==
```

### 2.删除本地保存的密钥

```
[H3C]delete ssh client server-public-key server-ip 192.168.1.1
```

### 3.重新登录，提示是否保存密钥，输入密码登录成功

```
<H3C>ssh 192.168.1.1
Username: admin
Press CTRL+C to abort.
Connecting to 192.168.1.1 port 22.
The server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:y
admin@192.168.1.1's password: 
Enter a character ~ and a dot to abort.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chjina.com/it-zhi-shi-ku/lu-you-jiao-huan/hua-san/5.-jiao-huan-ji-zuo-wei-ssh-ke-hu-duan-deng-lu-chu-cuo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
