h3c路由器ssh配置
当你第一次购买路由器或者需要重新设置Wi-Fi网络时,设置过程可能会让你感到有些困惑。不过不用担心,只需按照简单的步骤操作,你就可以快速设置好网络连接并开始畅游互联网
本文内容目录一览:
H3C S5130系列交换机ssh典型配置举例(passwd认证)
摘自H3C官网:
设备作为Stelnet 服务器配置举例(password认证)
1 组网需求
如 图1 所示,网络管理员需要通过Internet远程登录到校园网的网关设备(Device)上对其进行相关配置。为了提高对Device进行管理的安全性,可将Device配置为Stelnet服务器,并在Host上运行Stelnet客户端软件,在二者之间建立SSH连接。要求:
·Device通过SSH的password认证方式对客户端进行认证,认证过程在Device本地完成;
·网络管理员Host的登录用户名为client001,密码为aabbcc,登录设备后可以正常使用所有命令。
图1 设备作为Stelnet 服务器配置组网图
2 配置思路
·为了使SSH的版本协商和算法协商过程正常运行,且为了保证客户端对连接的服务器的认证正常进行,请在服务器端生成RSA和DSA密钥对。
·为了采用本地认证的方式认证用户,需要在本地服务器Device上创建相应的本地用户,并在本地用户视图下配置密码。
·Stelnet客户端通过VTY用户线访问设备。因此,需要配置登录用户线的认证方式为scheme方式。
·为了使Stelnet用户登录设备后能正常使用所有命令,将用户角色设置为network-admin,缺省情况下本地用户的用户角色为network-operator。
3 使用版本
本举例是在S5130EI_E-CMW710-R3106版本上进行配置和验证的。
4 配置步骤
# 生成RSA密钥对。
system-view
[Device] public-key local create rsa
The range of public key size is (512~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys...
........................++++++
...................++++++
..++++++++
............++++++++
Create the key pair successfully.
# 生成DSA密钥对。
[Device] public-key local create dsa
The range of public key size is (512~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys...
.++++++++++++++++++++++++++++++++++++++++++++++++++*
........+......+.....+......................................+
...+.................+..........+...+.
Create the key pair successfully.
# 使能SSH服务器功能。
[Device] ssh server enable
# 创建VLAN 2,并将GigabitEthernet1/0/2加入VLAN 2。
[Device] vlan 2
[Device-vlan2] port gigabitethernet 1/0/2
[Device-vlan2] quit
# 配置VLAN接口2的IP地址,客户端将通过该地址连接Stelnet服务器。
[Device] interface vlan-interface 2
[Device-Vlan-interface2] ip address 192.168.1.40 255.255.255.0
[Device-Vlan-interface2] quit
# 设置Stelnet客户端登录用户界面的认证方式为scheme。
[Device] line vty 0 63
[Device-line-vty0-63] authentication-mode scheme
[Device-line-vty0-63] quit
# 创建本地用户client001,并设置用户密码、服务类型和用户角色。
[Device] local-user client001 class manage
New local user added.
[Device-luser-manage-client001] password simple aabbcc
[Device-luser-manage-client001] service-type ssh
[Device-luser-manage-client001]authorization-attribute user-role network-admin
[Device-luser-manage-client001] quit
5 配置文件
#
vlan 2
#
interface Vlan-interface2
ip address 192.168.1.40 255.255.255.0
#
interface GigabitEthernet1/0/2
port access vlan 2
#
line vty 0 63
authentication-mode scheme
#
ssh server enable
#
local-user client001 class manage
password hash
$h$6$CqMnWdX6LIW/hz2Z$4+0Pumk+A98VlGVgqN3n/mEi7hJka9fEZpRZIpSNi9b
cBEXhpvIqaYTvIVBf7ZUNGnovFsqW7nYxjoToRDvYBg==
service-type ssh
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
H3C交换机SSH配置方法
H3C交换机SSH配置方法
SSH为建立在应用层和传输层基础上的安全协议。那么用h3c交换机怎么配置ssh呢?下面为大家介绍最简单的配置方法,欢迎阅读!
使用SSH+密码认证(基本SSH配置方法)
注:在用户使用SSH登录交换机时,交换机对所要登录的用户使用密码对其进行身份验证
生成RSA和DSA密钥对
[H3C]public-key local create rsa
[H3C]public-key local create dsa
设置用户接口上的认证模式为AAA,并让用户接口支持SSH协议
[H3C]user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme
[H3C-ui-vty0-4]protocol inbound ssh
创建用户luwenju-juzi,设置认证密码为luwenju-!@# 登录协议为SSH,能访问的命令级别为3
[H3C]local-user luwenju-juzi
[H3C-luser-luwenju-juzi]password cipher luwenju-!@#
[H3C-luser-luwenju-juzi]service-type ssh level 3
指定用户luwenju-juzi的'认证方式为password
[H3C]ssh user luwenju-juzi authentication-type password
一个基本的SSH配置就结束了,配置完成后即可使用SSH登录工具进行连接交换机
使用SSH+密钥、密码认证(高级SSH配置方法)
注:客户端在使用SSH工具登录交换机时,交换机同时使用密钥和密码对所要登录的用户实行身份验证
生成RSA和DSA密钥对
[H3C]public-key local create rsa
[H3C]public-key local create dsa
设置用户接口上的认证模式为AAA认证,并在接口上开启SSH协议,并设置用户能访问的命令级别为3
[H3C]user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme
[H3C-ui-vty0-4]protocol inbound ssh
[H3C-ui-vty0-4]user privilege level 3
创建用户,并指定认证方式为公钥认证,用户名为luwenju-juzi,密码为luwenju-!@#
[H3C]local-user luwenju-juzi
[H3C-luser-luwenju-juzi]password cipher luwenju-!@#
[H3C-luser-luwenju-juzi]service-type ssh level 3
[H3C]ssh user luwenju-juzi authentication-type password-publickey
客户端生成公钥和私钥
用puttygen.exe生成公私钥对,然后放到某个文件夹下,在此,我们生成的公钥叫luwenjukey私钥为luwenju.ppk,然后我们把公钥文件luwenjukey上传到FTP服务器,然后登录交换机,将luwenjukey下载到交换机
ftp 202.106.0.20
[ftp]get luwenjukey
为用户生成公钥,在交换机上把文件luwenjukey中导入客户端的公钥,公钥名为luwenju-juzikey 注:luwenju-juzikey是为用户生成的公钥
[H3C]public-key peer luwenju-juzikey import sshkey luwenjukey
为用户luwenju-juzi指定公钥luwenju-juzikey
[H3C]ssh user luwenju-juzi assign publickey luwenju-juzikey
然后打开SSH登录工具,导入私钥luwenju.ppk,然后输入交换机的IP地址登录即可
;
h3c路由器ssh配置步骤有哪些
配置SSH
# 生成RSA 密钥对。
system-view
[Router] public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
1-13
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++
++++++++++++++
+++++
++++++++
# 生成DSA 密钥对。
[Router] public-key local create dsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
关于h3c路由器ssh配置和h3c路由器ssh配置命令的文章,就是上面的全部内容了,不知道有没有是您需要的内容。如果可以帮到您,记得收藏本站