user-interface vty 0 4
authentication-mode none
user privilege level 15 (也可以只给用户一个最低权限,然后在设备上面通过super命令来配置特权模式命令,方便用户操作)
user-interface vty 0 4
authentication-mode password
set authentication password cipher k4}WW;{A6uqcXT}k'OI~o3#
(密码认证模式有simple和cipher两种模式。simple在配置文件里为明文显示,cipher为密文显示)
user-interface vty 0 4
authentication-mode aaa
aaa
local-user admin password cipher XJUN8<9N-:5NZPO3JBXBHA!!
local-user admin privilege level 15
local-user admin service-type telnet
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh (华为默认绑定telnet登录)
aaa
local-user admin password cipher "=LP!6$^-IYNZPO3JBXBHA!!
local-user admin privilege level 15
local-user admin service-type ssh
stelnet server enable (记得开启服务)
ssh user admin
ssh user admin authentication-type password
ssh user admin service-type stelnet (设置服务类型)
line vty 0 4
authentication-mode none
user-role level-15
user-role network-operator
telnet server enable (记得开启服务)
user-interface vty 0 4
authentication-mode password
user-role level-15
user-role network-operator
set authentication password simple admin123
telnet server enable
local-user admin class manage
password simple admin123
service-type telnet
authorization-attribute user-role level-15
authorization-attribute user-role network-operator
user-interface vty 0 4
authentication-mode scheme
user-role network-operator
protocol inbound telnet
telnet server enable
local-user admin class manage
password simple admin123
service-type ssh
authorization-attribute user-role level-15
authorization-attribute user-role network-operator
user-interface vty 0 4
authentication-mode scheme
user-role network-operator
protocol inbound ssh
ssh server enable
line vty 0 4
no login
line vty 0 4
password admin123
login
privilege level 15
username admin privilege 15 password 0 admin123
line vty 0 4
login local
hostname r0 (不改名字无法和其它设备区别,否则不能生成密钥)
username admin privilege 15 secret 5 admin123
ip domain-name abc (配置域名)
crypto key generate rsa (生成密钥)
line vty 0 4
login local
transport input ssh (绑定ssh登录)
在配置远程登录管理设备时,经常忘记的就是开启服务,对于不同厂商设备,默认开启的服务不相同,因此在设置完成后无论哪种厂商设备都先开启下服务;对于ssh登录来说,需要一个绑定协议的过程,比telnet配置稍微复杂一些。