配置Console口的密码:
配置ssh登陆:
SSH服务器端配置
# 在交换机上创建VLAN接口,并为其分配IP地址,作为客户端连接的SSH服务器地址。
system-view
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[H3C-Vlan-interface1] quit
# 生成RSA密钥对。
[H3C] rsa local-key-pair create
# 设置用户接口上的认证模式为AAA认证。
[H3C] user-interface vty 0 4
[H3C-ui-vty0-4] authentication-mode scheme
# 设置用户接口上支持SSH协议。
[H3C-ui-vty0-4] protocol inbound ssh
[H3C-ui-vty0-4] quit
# 创建用户client001,设置其认证密码为abc,登录协议为SSH,能访问的命令级别为3。
[H3C] local-user client001
[H3C-luser-client001] password simple abc
[H3C-luser-client001] service-type ssh level 3
[H3C-luser-client001] quit
# 指定用户client001的认证方式为password认证
[H3C] ssh user client001 authentication-type password
客户端使用putty登陆
在“Protocol options”区域中,选择“Preferred SSH protocol version”参数的值为2。
以上使用红色标出的内容按照需要修改
用SecureCRT或XShell均报这个错误:
The server sent a disconnect packet.
The connection is closed by SSH Server
Current FSM is SSH_Main_SSHProcess (code: 2)
[H3C]rsa local-key-pair create
# 配置Console口的认证方式为本地口令认证,且认证口令为明文cdw。
system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] authentication-mode password
[Sysname-ui-aux0] set authentication password simple cdw
以上使用红色标出的内容按照需要修改
配置完成后,当用户使用Console口登录交换机时,只有输入正确的口令才能实现成功登录交换机。
]]>