I would like to share a post about how to configure password-free login and use the RSA authentication on the MA5801-GP08.
The procedure is as follows:
1. Configure the Linux client
Run the following commands to generate public keys:
linux# ssh-keygen -t rsa -b 2048 // Generate a 2048-bit RSA public key password.
The content of the id_rsa.pub public key is as follows:
ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQDAsniVmdcYuxgaQBSvfriRq4aszx7YSdnYKvJH9RTX1fCcuuw0Xj8cxu0GVJTKxKeKtI9Z5/
6khLJ7KEP5g3Qff/diGAuhQj80RcBP0vMHd8+z2oPqP45Ulj/TwhSX2s7r3osJENSfwNzZA/oLKMv1k/
3Kh3SMt3isuBd8uJDS6GQwR7jrEuB2nvHjd/4PyfZWl5sSiXEwBgMa1TFCsKNW6LfHlahew1xnsi3vm+
5EfG6dlN1SlBF5dfTlgqVjbt94Ww23mAt0qVqXAT7FGdz6/WXz/2Obz6fa/KCIi5khLjhV9h6clOrT7+
5C5TwJ+VMCVpIAASaiSbKrI5Nhm1BX xxx@DESKTOP-0O7DRN5
Open the public key and paste the public key to the device configuration in the following content.
2. Configurations on the MA5801
MA5801-GP08 (config)#rsa peer-public-key ssh_test
{ <cr>|encoding-type<K> }: encoding-type
{ enc-type<E><der,pem,openssh> }: openssh
Command:
rsa peer-public-key ssh_test encoding-type openssh
Enter "RSA public key" view, and you can return the system view with
"peer-public-key end".
MA5801-GP08(config-rsa-public-key)#public-key-code begin
Enter "RSA key code" view, and you can return the last view with
"public-key-code end".
MA5801-GP08(config-rsa-public-key-rsa-key-code)#ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA
AABAQDAsniVmdcYuxgaQBSvfriRq4aszx7YSdnYKvJH9RTX1fCcuuw0Xj8cxu0GVJTKxKeKtI9Z5/6kh
LJ7KEP5g3Qff/diGAuhQj80RcBP0vMHd8+z2oPqP45Ulj/TwhSX2s7r3osJENSfwNzZA/oLKMv1k/3Kh
3SMt3isuBd8uJDS6GQwR7jrEuB2nvHjd/4PyfZWl5sSiXEwBgMa1TFCsKNW6LfHlahew1xnsi3vm+5Ef
G6dlN1SlBF5dfTlgqVjbt94Ww23mAt0qVqXAT7FGdz6/WXz/2Obz6fa/KCIi5khLjhV9h6clOrT7+5C5
TwJ+VMCVpIAASaiSbKrI5Nhm1BX xxx@DESKTOP-0O7DRN5
MA5801-GP08(config-rsa-public-key-rsa-key-code)#public-key-code end
MA5801-GP08(config-rsa-public-key)#peer-public-key end
3. Creating a User on the MA5801
MA5801-GP08(config)#terminal user name
User Name(length<6,15>):aidim78
User Password(length<6,15>):
Confirm Password(length<6,15>):
User profile name(<=15 chars)[root]:
User's Level:
1. Common User 2. Operator 3. Administrator:3
Permitted Reenter Number(0--20):20
User's Appended Info(<=30 chars):
Adding user successfully
Repeat this operation? (y/n)[n]:n
4. Configure public key authentication on the MA5801
MA5801-GP08(config)#ssh user aidim78
{ assign<K>|authentication-type<K> }: assign
{ rsa-key<K> }: rsa-key
{ key-name<S><Length 1-40> }: ssh_test
Command:
ssh user aidim78 assign rsa-key ssh_test
MA5801-GP08(config)#ssh user aidim78
{ assign<K>|authentication-type<K> }: authentication-type
{ all<K>|password<K>|password-publickey<K>|rsa<K> }: rsa
Command:
ssh user aidim78 authentication-type rsa
Warning: Authentication type is set, and will be in effect next time.
MA5801-GP08(config)#
! RUNNING MINOR 2023-01-28 15:17+00:00
EVENT NAME :The managing user of the equipment logout or logon
PARAMETERS :User name: aidim78, Log mode: SSH, IP: 9.x.x.210, State: Log on
MA5801-GP08(config)#
Please check whether system data has been changed, and save data in time
Configuration console time out, please retry to log on
Info: The connection was closed by the remote host.
5. Local login to verify results
That’s all I’ve shared about the configuring password-free login for the MA5801.
I hope it’s helpful to you!
Leave a comment