华为交换机使用SSH方式远程登陆必要的配置

本文介绍了一种当通过非默认端口进行SSH登录时遇到登录失败的情况下的解决方案。具体步骤包括使用console连接到设备,修改VTY接口配置以暂时启用所有协议,之后重新设置为仅允许SSH,以此来修复登录问题。

#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user *** password cipher ***

 local-user *** privilege level 3
 local-user *** service-type ssh
 undo local-user admin
#
 stelnet server enable
 ssh user ***
 ssh user *** authentication-type password
 ssh user *** service-type stelnet
#
user-interface maximum-vty 15
user-interface con 0
 authentication-mode password
 set authentication password cipher ***
 idle-timeout 5 0
user-interface vty 0 4
 authentication-mode aaa
 user privilege level 15
 history-command max-size 20
 idle-timeout 5 0
 screen-length 0
 protocol inbound ssh
user-interface vty 5 14
#

 

 

如果用其它端口远程登陆修改SSH方式,会出现原方式无法登陆,新方式也无法登陆。用console连接并管理交换机

进入

user-interface vty 0 4

将以下配置

 protocol inbound ssh

改为
 protocol inbound all

再改回

 protocol inbound ssh

就可以了。

 


    本文转自wangheyu1 51CTO博客,原文链接:http://blog.51cto.com/wangheyu1/1919555,如需转载请自行联系原作者






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值