在华为设备上配置SSH远程管理

在华为设备上配置SSH远程管理

1.配置接口ip
r1配置接口ip

[r1] interface GigabitEthernet0/0/0
[r1-GigabitEthernet0/0/0] ip address 192.168.1.1 255.255.255.0

r2配置接口ip
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 24

查看配置的接口ip命令 display ip interface brief

2.R2上配置远程登录
[R2]stelnet server enable 开启SSH协议
[R2]rsa local-key-pair create 创建加密报文的密钥对
Input the bits in the modulus[default = 512]:1024


[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 admin authentication-type all 定义ssh用户的认证模式


[R2]aaa
[R2-aaa]local-user admin password cipher huawei
[R2-aaa]local-user admin privilege level 2
[R2-aaa]local-user admin service-type ssh 创建ssh用户

3.通过SSH登录R2
[R1]ssh client first-time enable
[R1]stelnet 192.168.1.2

猜你喜欢

转载自blog.51cto.com/13212728/2515271