SSH是在传统的Telnet协议基础上发展起来的一种安全的远程登录协议。发送和接收数据时, SSH会自动对数据进行加密及解密。相比于Telnet,SSH能防止“中间人”攻击、DNS欺骗、IP 欺骗等,无论是在认证方式或者数据传输的安全性上都有很大的提高。 SSH用户认证方式有3种,分别为本地(Local)认证、RADIUS认证和TACACS+认证。以表规划数据为例,说明配置SSH登录的步骤。
配置认证方式为Local认证的SSH用户登录
1.全局配置模式下开启SSH功能。
ZXR10(config)#ssh server enable
2.配置AAA认证,配置用户认证方式为Local认证。
ZXR10(config)#aaa-authentication-template 2100
ZXR10(config-aaa-authen-template)#aaa-authentication-type local
/*配置认证方式为Local认证*/
ZXR10(config-aaa-authen-template)#exit
3.配置用户管理模板并将AAA模板绑定到用户管理模板
ZXR10(config)#system-user
ZXR10(config-system-user)#authentication-template 100
ZXR10(config-system-user-authen-temp)#bind aaa-authentication-template 2100
ZXR10(config-system-user-authen-temp)#exit
4.创建用户,配置用户名、密码并绑定相应的模板。
ZXR10(config)#system-user
ZXR10(config-system-user)#default-privilege-level 0
ZXR10(config-system-user)#user-name zte
ZXR10(config-system-user-username)#bind authentication-template 100
ZXR10(config-system-user-username)#password ZTEzte_123
ZXR10(config-system-user-username)#exit