華爲和H3C設備開啓ssh登錄

華爲設備開啓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.h3c.com/cn/d_200808/614453_30005_0.htm#_Toc205610951
http://www.h3c.com/cn/d_201706/1003748_30005_0.htm#_Toc485632771

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章