华为 5700 配置ssh

配置PC作为STelnet客户端连接SSH服务器的示例配置PC作为STelnet客户端连接SSH服务器的示例。在本示例中,通过在SSH服务器端生成本地密钥对,并在SSH服务器端配置SSH用户的用户名和密码,使能Stelnet服务,实现Stelnet客户端连接SSH服务器。
组网需求如图1所示,SSH服务器端STelnet服务使能后,STelnet客户端可以通过Password、RSA、password-rsa或all认证的方式登录到SSH服务器端。
配置登录用户Client001,密码为“huawei”,登录验证方式为password。
服务器端IP地址是192.168.1.1。
用户界面仅支持SSH协议。
图1 配置PC作为STelnet客户端连接SSH服务器组网图

配置思路采用如下的思路配置PC作为STelnet客户端连接SSH服务器:
用户Client001的配置在SSH服务器上完成。
SSH服务器端STelnet服务使能。
配置SSH服务器端缺省的认证方式为password。

数据准备为完成此配置例,需准备如下的数据:
SSH用户名及认证方式。
SSH用户密码。
SSH服务器名。

操作步骤
在服务器端生成本地密钥对 system-view[Quidway] sysname SSH Server[SSH Server] rsa local-key-pair createThe key name will be: Quidway_HostThe range of public key size is (512 ~ 2048).NOTES: If the key modulus is greater than 512, It will take a few minutes.Input the bits in the modulus[default = 512]: 768Generating keys..........++++++++++++..........++++++++++++...................................++++++++......++++++++
在服务器端配置VTY用户界面 [SSH Server] user-interface vty 0 4[SSH Server-ui-vty0-4] authentication-mode aaa[SSH Server-ui-vty0-4] protocol inbound ssh[SSH Server-ui-vty0-4] quit 说明: 若配置登录协议为SSH,则S2300设备将自动禁止Telnet功能。

在服务器端配置SSH用户的用户名和密码 [SSH Server] aaa[SSH Server-aaa] local-user client001 password cipher huawei[SSH Server-aaa] local-user client001 privilege level 3[SSH Server-aaa] local-user client001 service-type ssh[SSH Server-aaa] quit
使能STelent功能,并配置用户的服务类型为STelnet [SSH Server] stelnet server enable[SSH Server] ssh authentication-type default password
验证配置结果 # 通过putty软件登录设备,指定设备的IP地址192.168.1.1,并指定登录方式为SSH。

通过putty软件登录设备,输入用户名和密码,用户名client001,密码huawei。

配置文件
SSH服务器的配置文件

sysname SSH Server#aaa local-user client001 password cipher huaweilocal-user client001 privilege level 3 local-user client001 service-type ssh# stelnet server enable ssh authentication-type default password#user-interface vty 0 4 authentication-mode aaa protocol inbound ssh#return

猜你喜欢

转载自blog.51cto.com/876094/2155983