S5700 无法通过ssh方式登录

问题描述

用户配置S5720S-52X-PWR-LI-AC通过ssh方式登录

主要相关配置

aaa

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default

domain default_admin

local-user admin password irreversible-cipher %^%#Hq8=:bi95"RBHbD;Wz1;VhMeRtv,N<wI6lYn&)'EYKi$4X49~Lr5jtRzBYd3%^%#

local-user admin privilege level 15

local-user admin service-type telnet terminal ssh http

stelnet server enable

ssh authentication-type default password

ssh user admin

ssh user admin service-type all

ssh client first-time enable

user-interface con 0

authentication-mode password

set authentication password cipher $1a$aagDR-,)J1$g:1|:<&)r0YGz]9z'`*0/Y;i2AEaa(TNxbFE6@M"$

user-interface vty 0 4

authentication-mode aaa

user privilege level 15

protocol inbound all

user-interface vty 16 20

用终端登录提示:the connection was closed by remote host。

告警信息

无。

处理过程

排查配置

1、AAA配无问题

2、user-interface 接口下配置也无问题

3、ssh配置时同时出现了ssh user 和 ssh authentication-type default password 命令。

根因

ssh authentication-type default password 这条命令是全局模式下默认配置但是只有未配置ssh user 时才生效。而现在配置了ssh user导致ssh authentication-type default password 这条命令不生效,也就导致用户无法通过SSH方式登录。

解决方案

增加一条命令:ssh user admin authentication-type password。使配置了ssh user的情况下指定认证方式为password。

建议与总结

配置ssh登录时,建议都把ssh user admin authentication-type 这条命令加上。

阅读剩余
THE END