Host(SSH客戶端)與Router建立本地連接。Host采用SSH協議登錄到Router上,以保證數據信息交換的安全。此處采用的認證方式為password認證,用戶名和密碼保存在Router上。
# 生成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] line vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
# 設置Router上遠程用戶登錄協議為SSH。
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
# 創建本地用戶client001,密碼為aabbcc,並設置用戶訪問的命令級別為最高級別3。
[H3C] local-user client001 class manage
[H3C-luser-manage-client001]password simple aabbcc
[H3C-luser-manage-client001]service-type ssh
[H3C-luser-manage-client001] authorization-attribute user-role network-admin
[H3C-luser-manage-client001]quit
# 配置SSH用戶client001的服務類型為Stelnet,認證方式為password認證(此步驟非必配)。
[H3C]ssh user client001 service-type stelnet authentication-type password
#保存配置
[H3C]save force
SSH客戶端軟件有很多,此處以SecureCRT SecureCRT登錄方式如下:
打開文件---快速連接,選擇協議SSH1,輸入設置的用戶名和口令:
該案例暫時沒有網友評論
✖
案例意見反饋
親~登錄後才可以操作哦!
確定你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作