Telnet-SSHサービス構成

これは非常に基本的なことなので、紹介について言及する必要はありません。

AAAとpaswordの2つの認証モード

トポロジー:
ここに写真の説明を挿入

要件:
R1とR2は相互運用可能です2.R1
はSSHサービス
です3.R2はtelnetサービスです
概要

要するに、学校のカリキュラムはH3Cであり、私は両方を実行しましたが、コマンドはほぼ同じです。

首先配置IP
R1:
[Huawei-Ethernet0/0/0]ip add 10.1.1.1 24
R2:
[Huawei-Ethernet0/0/0]ip add 10.1.1.2 24

先配置R1上的ssh

//首先配置RSA密钥,1024
[R1]rsa local-key-pair create 
The key name will be: R1_Host
The range of public key size is (512 ~ 2048). 
NOTES: If the key modulus is greater than 512, 
       it will take a few minutes.
Input the bits in the modulus[default = 512]:1024
Generating keys...
....++++++
.++++++
...++++++++
................................++++++++
[Huawei]stelnet server enable   //华为和别的开始SSH的命令不同,注意
Info: Succeeded in starting the Stelnet server.

认证模式就AAA把,
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]protocol inbound all   //这一定要配置这条命令,我第一次没配置爆错,ALL 也可以改成别的服务

[R1]aaa
[R1-aaa]local-user admin password cipher admin888
[R1-aaa]local-user admin service-type ssh 
//配置用户admin 服务为ssh
[R1-aaa]local-user admin privilege level 3
 //给用户权限
[R1]ssh user admin authentication-type password  //设置ssh用户
验证

ここに写真の説明を挿入

R2配置Telnet 这里使用password密码认证:
[Huawei]telnet server enable 
Info: The Telnet server has been enabled.

[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode password 
[Huawei-ui-vty0-4]set authentication password simple admin888	
[Huawei-ui-vty0-4]protocol inbound all 

验证

ここに写真の説明を挿入

概要:2つの認証モード

おすすめ

転載: blog.csdn.net/Nocker888/article/details/104494685