一、作用
在日常工作中,登錄網絡設備,對其進行配置主要有幾種方式:console、Telnet與ssh。這樣可以實現遠程(只要網絡可達)控制,極大的方便了工作。今天主要講解一下配置Telnet登錄設備。
二、配置過程
通過兩個實驗熟悉一下配置過程,我這里配置雲設備使用電腦進行測試。
AR1的基本配置
<Huawei>system-view
[Huawei]sysname AR1
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.159.20 24
一般有兩種配置方式:AAA認證模式與password認證模式 來進行配置,這里分別實驗一下。
1、AAA認證模式配置
AR1的配置:
//開啟telnet服務(有的默認開啟)
[AR1]telnet server enable
//設置最大同時可登錄個數(可不配置默認是5)
[AR1]user-interface maximum-vty 5
//配置虛擬接口
[AR1]user-interface vty 0 4
//配置用戶終端的身份驗證模式為aaa認證
[AR1-ui-vty0-4]authentication-mode aaa
//配置vty支持telnet協議
[AR1-ui-vty0-14]protocol inbound telnet
//進入aaa模式
[AR1]aaa
//設置用戶名admin與密文密碼admin123
[AR1-aaa]local-user admin password cipher admin123
//配置接入類型服務(Telnet)
[AR1-aaa]local-user admin service-type telnet
//配置admin用戶的權限(超級用戶權限)
[AR1-aaa]local-user admin privilege level 3
//配置完成保存一下
<AR1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
測試
2、password認證模式配置
此認證模式只需要輸入密碼(密碼正確即可建立連接)
//開啟telnet服務(有的默認開啟)
[AR1]telnet server enable
//配置虛擬接口
[AR1]user-interface vty 0 4
//配置用戶終端的身份驗證模式為password認證
[AR1-ui-vty0-4]authentication-mode password
//設置密碼長度,最大為16位
Please configure the login password (maximum length 16):16
//設置密文密碼(此處我設置為admin123)
[AR1-ui-vty0-4]set authentication password cipher admin123
//最后保存一下
<AR1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
測試