简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。
在 BES-53248 集群交换机上启用 SSH
贡献者
建议更改
如果要使用以太网交换机运行状况监控器(CSHM)和日志收集功能、则必须生成SSH密钥、然后在集群交换机上启用SSH。
步骤
-
验证SSH是否已禁用:
show ip ssh
显示示例
(switch)# show ip ssh SSH Configuration Administrative Mode: .......................... Disabled SSH Port: ..................................... 22 Protocol Level: ............................... Version 2 SSH Sessions Currently Active: ................ 0 Max SSH Sessions Allowed: ..................... 5 SSH Timeout (mins): ........................... 5 Keys Present: ................................. DSA(1024) RSA(1024) ECDSA(521) Key Generation In Progress: ................... None SSH Public Key Authentication Mode: ........... Disabled SCP server Administrative Mode: ............... Disabled
-
生成 SSH 密钥:
crypto key generate
显示示例
(switch)# config (switch) (Config)# crypto key generate rsa Do you want to overwrite the existing RSA keys? (y/n): y (switch) (Config)# crypto key generate dsa Do you want to overwrite the existing DSA keys? (y/n): y (switch) (Config)# crypto key generate ecdsa 521 Do you want to overwrite the existing ECDSA keys? (y/n): y (switch) (Config)# aaa authorization commands "noCmdAuthList" none (switch) (Config)# exit (switch)# ip ssh server enable (switch)# ip scp server enable (switch)# ip ssh pubkey-auth (switch)# write mem This operation may take a few minutes. Management interfaces will not be available during this time. Are you sure you want to save? (y/n) y Config file 'startup-config' created successfully. Configuration Saved!
请确保在修改密钥之前禁用SSH、否则交换机上会报告警告。 -
加密SSH密钥(仅限* FIPS模式*):
在FIPS模式下、为了安全起见、需要使用密码短语对密钥进行加密。如果没有加密密钥、应用程序将无法启动。可使用以下命令创建和加密密钥: 显示示例
(switch) configure (switch) (Config)# crypto key encrypt write rsa passphrase <passphase> The key will be encrypted and saved on NVRAM. This will result in saving all existing configuration also. Do you want to continue? (y/n): y Config file 'startup-config' created successfully. (switch) (Config)# crypto key encrypt write dsa passphrase <passphase> The key will be encrypted and saved on NVRAM. This will result in saving all existing configuration also. Do you want to continue? (y/n): y Config file 'startup-config' created successfully. (switch)(Config)# crypto key encrypt write ecdsa passphrase <passphase> The key will be encrypted and saved on NVRAM. This will result in saving all existing configuration also. Do you want to continue? (y/n): y Config file 'startup-config' created successfully. (switch) (Config)# end (switch)# write memory This operation may take a few minutes. Management interfaces will not be available during this time. Are you sure you want to save? (y/n) y Config file 'startup-config' created successfully. Configuration Saved!
-
重新启动交换机:
re负载
-
验证是否已启用 SSH :
show ip ssh
显示示例
(switch)# show ip ssh SSH Configuration Administrative Mode: .......................... Enabled SSH Port: ..................................... 22 Protocol Level: ............................... Version 2 SSH Sessions Currently Active: ................ 0 Max SSH Sessions Allowed: ..................... 5 SSH Timeout (mins): ........................... 5 Keys Present: ................................. DSA(1024) RSA(1024) ECDSA(521) Key Generation In Progress: ................... None SSH Public Key Authentication Mode: ........... Enabled SCP server Administrative Mode: ............... Enabled
下一步是什么?
"配置交换机运行状况监控"(英文)