温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

华为和H3C设备开启ssh登录

发布时间:2020-07-09 14:50:46 来源:网络 阅读:9191 作者:f_066 栏目:网络管理

华为设备开启ssh登录

  1. 服务器端生成本地密钥对
<HUAWEI> system-view
[HUAWEI] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: SSH Server_Host
The 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 = 2048]:2048
Generating keys...
......................++++++++
........................................................++++++++
........+++++++++
.....+++++++++

**2. 在服务器端创建SSH用户

# 配置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用户client001。

# 新建用户名为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

3. SSH服务器端开启STelnet服务功能

# 开启STelnet服务功能。

[SSH Server] stelnet server enable
4. 配置SSH用户client001、client002的服务方式为STelnet

[SSH Server] ssh user client001 service-type stelnet

参考:http://forum.huawei.com/enterprise//zh/thread-334309.html

H3C S5800-32C设备开启ssh登录

在交换机上创建vlan接口,并为其分配IP地址,作为客户端连接ssh服务器的地址。

<H3C>system-view
[H3C]interface Vlan-interface 1
[H3C-Vlan-interface1]ip add 192.168.0.1 255.255.255.0
[H3C-Vlan-interface1]quit

生成RSA密钥对
[H3C]public-key local create rsa

设置用户接口上的认证模式为AAA认证。

[H3C]user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme

设置用户接口上支持ssh协议。

[H3C-ui-vty0-4]protocol inbound all
[H3C-ui-vty0-4]quit

创建用户ssh-user,设置认证密码为abc,登录协议为SSH,能访问的命令级别为3。

[H3C]local-user ssh-user
[H3C-luser-ssh-user]password cipher abc
[H3C-luser-ssh-user]service-type ssh
[H3C-luser-ssh-user]authorization-attribute level 3
[H3C-luser-ssh-user]quit

指定ssh-user的认证方式为password认证,并开启ssh服务。

[H3C]ssh user ssh-user service-type stelnet authentication-type password
[H3C]ssh server enable

参考:http://www.h4c.com/cn/d_200808/614453_30005_0.htm#_Toc205610951
http://www.h4c.com/cn/d_201706/1003748_30005_0.htm#_Toc485632771

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI