[R1]aaa //进入aaa(认证授权审计)
[R1-aaa]local-user huawei password cipher XXXX //本地创建用户ender以及对应密码
Info: Add a new user.
[R1-aaa]local-user ender privilege level 15 //该用户级别15(最高级别)
[R1-aaa]local-user huawei service-type ssh //该用户服务于ssh应用
[R1]ssh user huawei authentication-type password
Authentication type setted, and will be in effect next time
[R1]stelnet server enable //开启ssh服务
[R1]rsa local-key-pair create //本地创建秘钥
[R1]user-interface vty 0 4
authentication-mode aaa //认证采用aaa,即去本地创建的aaa账户和密码认证
protocol inbound ssh //vty允许ssh登录
terminal monitor
客户端测试:
ssh client first-time enable
路由器作为客户端测试
[Internet]stelnet 202.100.1.1 // 注意需要在系统视图进行 ssh 登录
Please input the username:huawei //键入用户名
Trying 202.100.1.1 …
Press CTRL+K to abort
Connected to 202.100.1.1 …
The server’s public key does not match the one catched before.
The server is not authenticated. Continue to access it? (y/n)[n]:y //继续接入远程设备
[Internet]
Update the server‘s public key now? (y/n)[n]:y //如有必要更新服务器端的公钥,键入y
Enter password: //键入密码
system-view //登录成功