1. Gererating a key
1.0 for Putty:
* open PuTTY Key Generator:

* RSA
* number of bits 2048
* Generate
* save public key (for example as a 'putty_public.key')
* save private key (for example as a 'putty_private.key')
2.0 for SecureCRT:
* Tools
* Create Public key
* next
* Select 'RSA'
* Next,Next
* 2048
* Next
* Standrard Public Key and VanDyke Private Key Format
* name: (for example 'securecrt_private.key')
* Finish
3.0 Huawei Config
Don't type here any '?' or 'tab' things for autocompletion here, its better copy that command from the notepad(!). And yes just copy of the code from the publuc key, because terminal my think that ? or any other symbols are the part of the public key and will show you an error.
rsa peer-public-key KEY_NAME encoding-type pem
public-key-code begin
----- BEGIN SSH2 PUBLIC KEY -----
SOME KEY IS HERE
----- END SSH2 PUBLIC KEY -----
public-key-code end
peer-public-key end
!
aaa
local-user ANY_NAME service-type ssh
!
user-interface vty 0 4
user privilege level 15 (important to get priveleges for that username)
!
stelnet server enable
ssh user ANY_NAME authentication-type rsa
ssh user ANY_NAME assign rsa-key KEY_NAME
ssh user ANY_NAME service-type stelnet
4.0 Using keys
for putty:
ssh>auth>path to a private key
connection>data>auto-login username 'ANY_NAME' (important)
for securecrt:
tools->manage agent keys->add a private key
in session ->connection>ssh2>enable only 'public key' or put it at the top
Username: 'ANY_NAME' (important)
5.0 try to connect




