问题描述:
昨天使用ssh 登录设备提示密码过期,修改新密码后登录正常。期间有两三次从新登录(注:最后一次登录时未出现自动超时登出情况,一直保持在线状态)准备操作时设备出现异常登出,登出后就再也登录不上了,并提示如下告警信息。
登录失败提示日志:
The host key is saved automatically, for you have set the session properties [SSH - Save host key at first connection].
Password: ************
Failed to login because the idle timer expired.
Connection closing...Socket close.
Connection closed by foreign host.
Disconnected from remote host(xxxx(SSH)@10.1.200.120) at 09:07:21.
Type `help' to learn how to use Xshell prompt.
[C:\~]$
型号版本:
H3C Comware Software, Version 7.1.070, Release 6328P03
Copyright (c) 2004-2021 New H3C Technologies Co., Ltd. All rights reserved.
H3C S5560S-28P-SI
SSH相关配置:
ssh server enable
ssh user xxxxxx service-type all authentication-type any
ssh user xxx service-type all authentication-type any
ssh user xxxx service-type all authentication-type any
#
password-control enable
undo password-control history enable
password-control composition type-number 3 type-length 1
undo password-control complexity user-name check
#
您好,参考配置指导
1.生成RSA和DSA密钥对
[H3C]public-key local create rsa
[H3C]public-key local create dsa
2.设置用户接口上的认证模式为AAA,并让用户接口支持SSH协议
[H3C]user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme
[H3C-ui-vty0-4]protocol inbound ssh
3.创建用户admin,设置认证密码为luwenju-!@# 登录协议为SSH,能访问的命令级别 为 3
[H3C]local-user admin
[H3C-luser-admin]password cipher luwenju-!@#
[H3C-luser-admin]service-type ssh level 3
4.指定用户admin的认证方式为password
[H3C]ssh user admin authentication-type password
2.1 配置步骤
# 进入系统视图,并开启ssh服务,默认开启。
<H3C> system-view
[H3C] SSH server enable
# 创建本地账号abc,密码为123456,权限级别为network-admin。//如果现场同一个本地用户既需要通过ssh登录,又需要console登录,则服务器类型需要添加 terminal
[H3C] local-user abc
[H3C-luser-abc] password simple 123456
[H3C-luser-abc] service-type ssh terminal
[H3C-luser-abc] authorization-attribute user-role network-admin
[H3C-luser-abc] quit
# 配置VTY接口认证模式为scheme模式(用户名+密码认证)。用于ssh登录
[H3C] line vty 0 4
[H3C-ui-vty0-4] authentication-mode scheme //另两种认证模式为None(无密码)和Password(单密码)
[H3C-ui-vty0-4] quit
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论