给出报错截图,怀疑是连接数上限了。
打开你的电脑,在浏览器输入知了社区,找到这个帖子,要么在别人下面评论,要么点我的头像。
参考SSH配置 检查下配置 1 配置设备作为SSH服务器
截图上传不了 ssh 1.1.1.1 vpn-instance MGMT Username: admin Press CTRL+C to abort. Connecting to 1.1.1.1 port 22. The server is not authenticated. Continue? [Y/N]:y Do you want to save the server public key? [Y/N]:n admin@1.1.1.1's password: Enter a character ~ and a dot to abort. %May 13 15:47:39:508 2026 XX-XX-XXX SSHS/6/SSHS_AUTH_SUCCESS: SSH user admin from 1.1.1.1 port 48352 passed password authentication. %May 13 15:47:39:981 2026 XX-XX-XXX SSHS/6/SSHS_DISCONNECT: SSH user admin (IP: 1.1.1.1) disconnected from the server. Connection to 1.1.1.1 closed by remote host. Connection to 1.1.1.1 closed.
display current-configuration | include user-interface vty -C 10,检查是否有以下遗漏:scheme(即用户名密码认证)。network-admin),否则系统不知道给登录用户分配什么权限,会直接踢出。2user-interface vty 0 4
3 authentication-mode scheme # 开启用户名密码认证
4 protocol inbound ssh # 允许 SSH 协议接入
5 user-role network-admin # 赋予最高管理权限(关键!缺失会导致秒退)
6 quitdisplay local-user username <你的用户名> 查看该用户的详细配置:ssh。如果只配置了 telnet 或 terminal,SSH 登录会被拒绝或断开。network-admin 或 level-15)。1local-user <你的用户名> class manage
2 service-type ssh # 必须包含 ssh
3 authorization-attribute user-role network-admin # 赋予管理员角色idle-timeout 0 0 表示永不超时,如果配置了极小的值也会导致刚连上就断开)。aaa session-limit ssh 1),如果已经有其他管理员在线,新的连接会被强制弹出。可以尝试执行 display ssh server status 查看当前 SSH 连接数。terminal monitor 和 terminal debugging。debugging ssh server all。User role mismatch、No authorization 或 Algorithm mismatch 等)。
display users
display ssh server status
system-view
# 设置SSH最大会话数
ssh server max-session 16
# 配置空闲超时,避免僵死会话占着线路
user-interface vty 0 15
idle-timeout 10 0
kill user all
system-view
user-interface vty 0 15
# 改成10分钟 0秒,够用
idle-timeout 10 0
# 关闭不必要的校验
undo authentication-mode
display local-user
system-view
local-user admin class manage
service-type ssh terminal
authorization-attribute user-role network-admin
user-interface vty 0 15
undo acl inbound
undo acl outbound
system-view
ssh server encryption-algorithm all
ssh server hmac-algorithm all
ssh server key-exchange-algorithm all
kill user all 踢掉僵死会话ssh server max-session 16idle-timeout 10 0service-type ssh
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
按我发的检查配置,不然就看我主页加我。