交换机SSH配置


华为

[HX]user-interface vty 0 4
[HX-ui-vty0-4]authentication-mode aaa
[HX-ui-vty0-4]protocol inbound ssh
[HX-ui-vty0-4]user privilege level 15
[HX-ui-vty0-4]qu
[HX]stelnet server enable 
[HX]ssh user superman
[HX]ssh user superman service-type stelnet 
[HX]ssh user superman authentication-type password
[HX]aaa
[HX-aaa]local-user superman password cipher superman@2020
[HX-aaa]local-user superman service-type ssh
[HX-aaa]local-user superman privilege level 15
[HX-aaa]undo local-aaa-user password policy administrator 		#去使能本地管理员策略

华三

[Switch] ssh server enable

[Switch] line vty 0 63
[Switch-line-vty0-63] authentication-mode scheme
[Switch-line-vty0-63] user-role network-admin
[Switch-line-vty0-63] quit


[Switch] local-user superman class manage
[Switch-luser-manage-superman] service-type ssh
[Switch-luser-manage-superman] password simple admin@123
[Switch-luser-manage-superman] authorization-attribute user-role network-admin
[Switch-luser-manage-superman] authorization-attribute user-role level-15
[Switch-luser-manage-superman] quit

##或者(推荐)
ssh server enable 

local-user superman class manage
 password simple admin@123
 service-type ssh
 authorization-attribute user-role network-admin

line vty 0 63
 authentication-mode scheme

ssh user admin service-type stelnet authentication-type password