实验7-配置ssh远程管理
环境:ensp模拟器
实验目标:通用R1远程登录R2,对R2的主机名做修改,
ssh远程管理实现
添加两台路由器
R2上的配置
1.配置接口IP
2.配置ssh远程管理:
[R2]stelnet server enable 开启SSH协议
[R2]rsa local-key-pair create 创建加密报文的密钥对,缺省情况下没有配置任何本地RSA或DSA密钥对
Input the bits in the modulus[default = 512]:1024
[R2]
[R2]aaa
[R2-aaa]local-user user-ssh password cipher huawei123
[R2-aaa]local-user user-ssh privilege level 2
[R2-aaa]local-user user-ssh service-type ssh 创建ssh用户
[R2-aaa]quit
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa
[R2-ui-vty0-4]protocol inbound ssh 开启vty线路的ssh访问功能
[R2-ui-vty0-4]quit
[R2]ssh user user-ssh authentication-type all 定义ssh用户的认证模式
R1上的配置
1.配置接口IP
2.通过ssh登录R2:
[R1]ssh client first-time enable
[R1]stelnet 12.1.1.2
Please input the username:user-ssh
Continue to access it? (y/n)[n]:y
Save the server's public key? (y/n)[n]:y
Enter password:
<R2>