当前位置:文档之家› 华为S5700 SSH远程管理配置实例

华为S5700 SSH远程管理配置实例

配置通过STelnet登录设备示例
组网需求
如图1所示,用户希望安全的远程登录设备,但是Telnet缺少安全的认证方式,用户可以通过STelnet方式进行远程的安全登录。

终端PC和SSH服务器之间路由可达,10.137.217.203是SSH服务器的管理口IP地址。

在SSH服务器端配置用户client001,PC使用client001用户通过Password认证方式登录SSH服务器。

图1 配置用户通过STelnet登录设备组网图
说明:
使用STelnet V1协议存在安全风险,建议使用STelnet V2登录设备。

配置思路
采用如下的思路配置用户通过STelnet登录设备:
1.PC端已安装登录SSH服务器软件。

2.在SSH服务器端生成本地密钥对,实现在服务器端和客户端进行安全地数据交互。

3.在SSH服务器端配置SSH用户client001。

4.在SSH服务器端开启STelnet服务功能。

5.在SSH服务器端配置SSH用户client001服务方式为STelnet。

6.用户client001以STelnet方式登录SSH服务器。

操作步骤
1.在服务器端生成本地密钥对
2.<HUAWEI> system-view
3.[HUAWEI] sysname SSH_Server
4.[SSH_Server] dsa local-key-pair create
: The key name will be:
HUAWEI_Host_DSA.
: The key modulus can be any one of the following : 512, 1024,
2048.
: If the key modulus is greater than 512, it may take a few
minutes.
8.Please input the modulus
[default=2048]:
: Generating
keys...
Info: Succeeded in creating the DSA host keys.
10.在服务器端创建SSH用户
# 配置VTY用户界面。

[SSH_Server] user-interface vty 0 14
[SSH_Server-ui-vty0-14] authentication-mode aaa
[SSH_Server-ui-vty0-14] protocol inbound ssh
[SSH_Server-ui-vty0-14] quit
# 新建用户名为client001的SSH用户,且认证方式为Password。

[SSH_Server] aaa
[SSH_Server-aaa] local-user client001 password irreversible-cipher Huawei@123 [SSH_Server-aaa] local-user client001 privilege level 3
[SSH_Server-aaa] local-user client001 service-type ssh
[SSH_Server-aaa] quit
[SSH_Server] ssh user client001 authentication-type password
11.SSH服务器端开启STelnet服务功能
[SSH_Server] stelnet server enable
12.配置SSH用户client001的服务方式为STelnet
13.[SSH_Server] ssh user client001 service-type stelnet
14.验证配置结果
# PC端client001用password认证方式连接SSH服务器。

# 通过PuTTY软件登录设备,输入设备的IP地址,选择协议类型为SSH。

图2 通过PuTTY软件用password认证方式连接SSH服务器示意图
# 点击“Open”,出现如下界面,输入用户名和密码,并按Enter键,至此已登录到SSH 服务器。

(以下显示信息仅为示意)
login as: client001
Sent username "client001"
client001@10.137.217.203's password:
Info: The max number of VTY users is 8, and the number
of current VTY users on line is 5.
The current login time is 2012-08-06 09:35:28+00:00.
<SSH_Server>
配置文件
SSH_Server的配置文件
#
sysname SSH_Server
#
aaa
local-user client001 password
irreversible-cipher %#%#aVW8S=aP=B<OWi1Bu'^R[=_!~oR*85r_nNY+kA(I}[TiLiVGR-i/'DFGAI-O%#%#
local-user client001 privilege level 3
local-user client001 service-type ssh
#
stelnet server enable
ssh user client001
ssh user client001 authentication-type password
ssh user client001 service-type stelnet
#
user-interface vty 0 14
authentication-mode aaa
#
return。

相关主题