删除本地SSH密钥之前要删除对应服务器的公钥
V5设备:
SSH客户端服务器密钥删除需要先取消在客户端上指定要连接的服务器端的主机公钥:
undo ssh client authentication server server assign publickey
然后再删除密钥:
undo public-key peer keyname
操作记录如下
<Client>ssh ?
STRING<1-20> IP address or hostname of remote system
ipv6 Specify IPv6 address or hostname of remote system
<Client>ssh 172.31.123.20
Username: test
Trying 172.31.123.20 ...
Press CTRL+K to abort
Connected to 172.31.123.20 ...
The Server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:y
Enter password:
******************************************************************************
* Copyright (c) 2004-2015 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<SSH-Server>qu
Connection closed.
<Client>dis cu
#
version 5.20, Release 3303P05
#
sysname Client
#
domain default enable system
#
telnet server enable
#
mpls lsr-id 1.1.1.1
#
password-recovery enable
#
mpls
#
mpls ldp
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
public-key peer 172.31.123.20
public-key-code begin
308201B73082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD
96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E
DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D
DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038
7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1
4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD
35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123
91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1
585DA7F42519718CC9B09EEF03818400028180325B07706D421A4342714EDEA5CBC4C34CBD
60F0001663F0ED81B2BF9A0E3C85AD8E1C8590A32C874AB274AFF20D851D56660F433E2BE6
5969B839B9DD5F5623FEA49D8F32EFCD31FCE2A5D890A99F68B341D4CD81FE3979A6D3D4DC
4C5FD4570DC13EDF77740A144ECCDE092E2DA5C6D6E62CB4482CA9D71C32C47C855AD90A
public-key-code end
peer-public-key end
#
isis 1
#
user-group system
group-attribute allow-guest
#
local-user h3c
<Client>
<Client>sys
System View: return to User View with Ctrl+Z.
[Client]undo ssh client auth ser 172.31.123.20 assign publickey
[Client]undo public-key peer 172.31.123.20
Warning: Do you really want to remove the public key named 172.31.123.20? [Y/N]:y
[Client]
V7的设备是可以直接使用undo public-key peer xxx 删除的。
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作