配置ssh远程管理

拓扑图:

命令介绍

1.配置接口IP 2.配置ssh远程管理:

#开启SSH协议
[R2]stelnet server enable      

#开启vty线路的ssh访问功能
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa  
[R2-ui-vty0-4]protocol inbound ssh           
[R2-ui-vty0-4]quit     

#配置aaa用户名密码和权限
[R2]aaa    
[R2-aaa]local-user admin password cipher admin123    
[R2-aaa]local-user admin privilege level 15  
[R2-aaa]local-user admin service-type ssh    
[R2-aaa]quit 
#创建加密报文的密钥对
[R2]rsa local-key-pair create    
Input the bits in the modulus[default = 512]:1024

#定义ssh用户的认证模式
[R2]ssh user admin  authentication-type all  

配置telnet登录设备

#配置验证模式
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa     
[R2-ui-vty0-4]quit

#配置AAA用户和权限
[R2]aaa
[R2-aaa]local-user admin password cipher admin123    
[R2-aaa]local-user admin privilege level 15
#定义用户的服务类别
[R2-aaa]local-user admin service-type telnet  
[R2-aaa]quit 

参考:https://blog.csdn.net/qq_40907977/article/details/106256809