| 场景 | 设备开局配置远程管理、替代 Telnet |
|---|---|
| 适用 | 全部设备 |
| 命令族 | stelnet server enable / crypto key / ssh server enable |
华为 VRP
华为 VRP
system-view
[Huawei] rsa local-key-pair create
(输入密钥长度 2048)
[Huawei] stelnet server enable
[Huawei] user-interface vty 0 4
[Huawei-ui-vty0-4] authentication-mode aaa
[Huawei-ui-vty0-4] protocol inbound ssh
[Huawei-ui-vty0-4] quit思科 IOS
思科 IOS
SW-CORE-01(config)# ip domain-name corp.local
SW-CORE-01(config)# crypto key generate rsa general-keys modulus 2048
SW-CORE-01(config)# ip ssh version 2
SW-CORE-01(config)# line vty 0 4
SW-CORE-01(config-line)# login local
SW-CORE-01(config-line)# transport input sshH3C Comware
H3C Comware
system-view
[H3C] public-key local create rsa
(输入密钥长度 2048)
[H3C] ssh server enable
[H3C] user-interface vty 0 4
[H3C-ui-vty0-4] authentication-mode scheme
[H3C-ui-vty0-4] protocol inbound ssh
[H3C-ui-vty0-4] quit思科必须先有 hostname + ip domain-name 才能生成 RSA 密钥;华为/H3C 先本地生成密钥对;VTY 放行协议:华为 stelnet、H3C ssh(或 all)、思科 transport input ssh。