Got it

ssh by key using putty/securecrt

Latest reply: Jul 11, 2021 12:12:22 717 9 5 0 0

1. Gererating a key

1.0 for Putty:

* open PuTTY Key Generator:

putty

* 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 

  • x
  • convention:

andersoncf1
MVE Author Created Jul 10, 2021 17:48:47

Very useful. Good sharing
View more
  • x
  • convention:

Serges_armel
Serges_armel Created Jul 10, 2021 20:44:17 (0) (0)
 
azkasaqib
Created Jul 10, 2021 18:27:46

good
View more
  • x
  • convention:

azkasaqib
Created Jul 10, 2021 18:27:52

ssh by key using putty/securecrt-4028231-1
View more
  • x
  • convention:

Serges_armel
Created Jul 10, 2021 20:44:37

Thank for share
View more
  • x
  • convention:

Unicef
MVE Created Jul 11, 2021 08:16:46

GOOD POST
View more
  • x
  • convention:

IndianKid
Author Created Jul 11, 2021 08:32:47

Very informative post, thanks for sahring
View more
  • x
  • convention:

hemin88
Author Created Jul 11, 2021 08:35:18

well explained, thanks for sharing
View more
  • x
  • convention:

user_4001805
Created Jul 11, 2021 12:12:22

Thanks for sharing
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.