[HUAWEI] ssh user abcd authentication-type ecc // 配置SSH用户认证方式为ecc [HUAWEI] ecc peer-public-key key01 encoding-type pem // 配置ECC公共密钥编码格式,并进入ECC公共密钥视图,key01为公共密钥名称 Enter "ECC public key" view, return system view with "peer-public-key end". [HUAWEI-ecc-public-key] public-key-code begin // 进入公共密钥编辑视图 Enter "ECC key code" view, return last view with "public-key-code end". [HUAWEI-dsa-key-code] 308188 // 拷贝复制客户端的公钥,为十六进制字符串 [HUAWEI-dsa-key-code] 028180 [HUAWEI-dsa-key-code] B21315DD 859AD7E4 A6D0D9B8 121F23F0 006BB1BB [HUAWEI-dsa-key-code] A443130F 7CDB95D8 4A4AE2F3 D94A73D7 36FDFD5F [HUAWEI-dsa-key-code] 411B8B73 3CDD494A 236F35AB 9BBFE19A 7336150B [HUAWEI-dsa-key-code] 40A35DE6 2C6A82D7 5C5F2C36 67FBC275 2DF7E4C5 [HUAWEI-dsa-key-code] 1987178B 8C364D57 DD0AA24A A0C2F87F 474C7931 [HUAWEI-ecc-key-code] A9F7E8FE E0D5A1B5 092F7112 660BD153 7FB7D5B2 [HUAWEI-ecc-key-code] 171896FB 1FFC38CD [HUAWEI-ecc-key-code] 0203 [HUAWEI-ecc-key-code] 010001 [HUAWEI-ecc-key-code] public-key-code end // 退回到公共密钥视图 [HUAWEI-ecc-public-key] peer-public-key end // 退回到系统视图 [HUAWEI] ssh user abcd assign ecc-key key01 // 为用户abcd分配一个已经存在的公钥key01
步骤 4
在服务器端生成本地密钥对:
1 2 3 4 5 6 7 8
<HUAWEI> system-view [HUAWEI] ecc local-key-pair create Info: The key name will be: HUAWEI_Host_ECC. Info: The key modulus can be any one of the following: 256, 384, 521. Info: If the key modulus is greater than 512, it may take a few minutes. Please input the modulus [default=521]:521 Info: Generating keys.......... Info: Succeeded in creating the ECC host keys.
步骤 5
PC 端用 Password 认证方式连接 SSH 服务器。通过 PuTTY 软件登录设备,输入设备的 IP 地址,选择协议类型为 SSH:
1 2 3 4 5
login as: abcd Sent username "abcd" abcd@10.10.10.20's password: Info: The max number of VTY users is 8, and the number of current VTY users on line is 5. The current login time is 2018-12-22 09:35:28+00:00. <HUAWEI>