首页/网络/网络设备配置速查/三厂 SSH 配置总对照:密钥、服务与登录
设备排障72 条

三厂 SSH 配置总对照:密钥、服务与登录

SSH 上线四件套:服务开启、密钥生成、用户/认证、VTY 放行协议。三厂命令结构对照,缺一不可。

网络设备配置速查网络更新于 2026-10-12
场景SSH 配置跨厂迁移/加固
适用三厂通用
命令族ssh server / crypto key

华为 VRP

华为 VRP
rsa local-key-pair create
stelnet server enable
ssh user admin authentication-type password
user-interface vty 0 4
 authentication-mode aaa
 protocol inbound ssh

思科 IOS

思科 IOS
ip domain-name example.com
crypto key generate rsa modulus 2048
ip ssh version 2
line vty 0 4
 login local
 transport input ssh

H3C Comware

H3C Comware
public-key local create rsa
ssh server enable
line vty 0 4
 authentication-mode scheme
 protocol inbound ssh
差异:密钥生成——华为 rsa local-key-pair create、思科 crypto key generate rsa、H3C public-key local create rsa;VTY 协议放行:protocol inbound ssh vs transport input ssh。

易错点

  • 思科生成 RSA 密钥前必须先配 hostname 与 ip domain-name,否则命令直接拒绝——迁移文档里最常被省略的一步

数据来源与参考

  • 华为 SSH 配置
  • Cisco SSH 配置
  • H3C SSH 配置

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌