本案例適用於如S5008PV2-EI、S5024PV2-EI-PWR、S5048PV2-EI-HPWR、S5120-52P-LI、S5120-28P-SI、S5120-48P-EI等S5000PV2、S5120係列的交換機。
Host(SSH客戶端)與Switch建立本地連接。Host采用SSH協議登錄到Switch上,以保證數據信息交換的安全。此處采用的認證方式為password認證,用戶名和密碼保存在Switch上。
# 生成RSA密鑰對。
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]public-key local create rsa
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...
++++++++++++++++++++++++++++++++++++++
+++++++++++
+++++++++++++
+++
# 生成DSA密鑰對。
[H3C]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...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++*+++++++++++++
# 啟動SSH服務器。
[H3C]ssh server enable
# 配置VLAN虛接口Vlan-interface 1的IP地址為192.168.1.1,此地址作為SSH服務器的登錄地址。
[H3C]interface Vlan-interface 1
[H3C-Vlan-interface1] ip address 192.168.1.1 255.255.255.0
[H3C-Vlan-interface1]quit
# 設置SSH客戶端登錄用戶界麵的認證方式為password認證。
[H3C] user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme
# 設置Switch上遠程用戶登錄協議為SSH。
[H3C-ui-vty0-4]protocol inbound ssh
[H3C-ui-vty0-4]quit
# 創建本地用戶client001,密碼為aabbcc,並設置用戶訪問的命令級別為最高級別3。
[H3C]local-user client001
[H3C-luser-client001]password simple aabbcc
[H3C-luser-client001]service-type ssh
[H3C-luser-client001] authorization-attribute level 3
[H3C-luser-client001]quit
# 配置SSH用戶client001的服務類型為Stelnet,認證方式為password認證(此步驟非必配)。
[H3C]ssh user client001 service-type stelnet authentication-type password
#保存配置
[H3C]save force
SSH客戶端軟件有很多,此處以SecureCRT和PuTTY為例:
SecureCRT登錄方式如下:
打開文件---快速連接,選擇協議SSH1,輸入設置的用戶名和口令:
登錄成功
使用PuTTY登錄方式:
打開PuTTY.exe程序,出現如圖所示的客戶端配置界麵。在“Host Name(or IP address)”文本框中輸入SSH服務器的IP地址192.168.1.1。
單擊<Open>按鈕。按提示輸入用戶名client001及密碼aabbcc,即可進入Switch的配置界麵。
該案例暫時沒有網友評論
✖
案例意見反饋
親~登錄後才可以操作哦!
確定你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作