According to the document. I can create rsa key pairs and upload the public key to the switch, then I can ssh to the switch.
I did it with command ssh-keygen but don't know how to upload to the switch. I tried ssh-copy-id root@switch but failed. In the document have to manually copy, paste into the console. The problem is that the format I have in the id_rsa.pub is different with the one in document
espl@ansible:~$ cat .ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5QhvE0iCZwM1LSk57vkbxb1APgXXeCM1tCUKsgpxrRcgag1FXSCmITsRTo/6WFBKdYPwe8yUKIB/yp3rUxsqGutPi/8fZngKlU7dyLVy6qjGm2v+XQo3mvMc8jTqvhxb1AomiE0ppne0bz0VQDBCOnOCnJP2VYKmheQgY0XbUklYHM4N8LcmyFMW7u9XB1NnQtIXfcHYtv5Hy7XhXYnRKvEvOQSEvLMaugczKNv7SVLJY4dSba5P3IG88JLmVjMA6qC5VZLP3aOqKVDBlsLd99Muz+ANZ9d4nBctQkGNJqh+TvCTvcBr9zxenG+50RB2aPW7SSwSnJ9b2XW58Gadr espl@ansible
But in the doc it is like below
huawei(config-rsa-public-key)#public-key-code beginEnter "RSA key code" view, return last view with "public-key-code end".
To then paste the converted public key, do as follows:
huawei(config-rsa-key-code)#30818602 8180E6B0 25E45C19 54F3DBAD D41C79BF 2054F2C9
huawei(config-rsa-key-code)#33775177 6F60F3B0 9654B03D 02A6A30F B04A5D59 E9BA7846
huawei(config-rsa-key-code)#32059FB6 1157F39B 2C60C890 9B92EFA6 CD566AE2 41621AEB
huawei(config-rsa-key-code)#7BC30538 7065BD5A E3D2380E F1ABF4BF A8EFB0C9 E9BB06E0
huawei(config-rsa-key-code)#8A060E0E 2022047C 009BA3F6 47257E1B B3498941 3C1281BA
huawei(config-rsa-key-code)#C5D64786 377B7426 2B5AA315 41C70201 25
How to convert ? I tried to use putty but failed, and I'm using the Linux.