新手須知:Telnet服務基礎
Telnet服務,是遠程登錄服務。在很多應用中我們都能看到它的使用。不少的應用平臺上也加入了這項功能。TELNET服務可以通過很多系統(tǒng)和軟件來實現(xiàn)。這里我們就談談TELNET服務的基礎內(nèi)容。首先我們來了解一下TELNET服務的基本概念和功能,之后對于它的相關命令進行一下介紹。
TELNET:TCP/IP Terminal Emulation Protocol
TELNET服務是 TCP/IP 環(huán)境下的終端仿真協(xié)議,通過 TCP 建立服務器與客戶機之間的連接。 連接之后, TELNET服務器與客戶機進入?yún)f(xié)商階段(決定可選項),選定雙方都支持連接操作,每個連接系統(tǒng)可以協(xié)商新可選項或重協(xié)商舊可選項(在任何時候)。通常 TELNET任一端盡量執(zhí)行所有可選項以實現(xiàn)系統(tǒng)最大化性能。
一旦建立 TELNET連接,連接兩端在網(wǎng)絡虛擬終端(NVT)中可以發(fā)起或中斷。 NVT 是一種假定設備,它是對規(guī)范終端的標準的、泛網(wǎng)絡的、中間的表示,從而避免了“服務器”與“用戶”需要維護終端和終端處理范例等信息的需要。 協(xié)商可選項原則基于這個事實:任何主機都希望在 NVT 上提供其它可用的服務,以及任何用戶都有精良的終端設備和需要優(yōu)質(zhì)的服務。
一旦 TELNET連接建立,由于每一方都希望從另一方獲得盡可能多的服務,連接雙方間的可選請求會不斷來回傳送。除此之外,這些可選請求還可用于動態(tài)修改連接特性以適應不斷改變的本地環(huán)境。
經(jīng)過過去 20 年左右的發(fā)展,當前的 TELNET服務已經(jīng)是一種多功能仿真器。選項使 TELNET能傳輸二進制數(shù)據(jù)、支持 byte macros 、仿真圖形終端,以及傳送信息以支持集中化終端管理。
TELNET連接中,傳輸?shù)拿畈捎?ASCII 文本形式。
以下是 TELNET服務的相關命令:
Commands | Code No. DecHex |
Description | |
data | All terminal input/output data. | ||
End subNeg | 240 | FO | End of option subnegotiation command. |
No Operation | 241 | F1 | No operation command. |
Data Mark | 242 | F2 | End of urgent data stream. |
Break | 243 | F3 | Operator pressed the Break key or the Attention key. |
Int process | 244 | F4 | Interrupt current process. |
Abort output | 245 | F5 | Cancel output from current process. |
You there? | 246 | F6 | Request acknowledgment. |
Erase char | 247 | F7 | Request that operator erase the previous character. |
Erase line | 248 | F8 | Request that operator erase the previous line. |
Go ahead! | 249 | F9 | End of input for half-duplex connections. |
SubNegotiate | 250 | FA | Begin option subnegotiation. |
Will Use | 251 | FB | Agreement to use the specified option. |
Won’t Use | 252 | FC | Reject the proposed option. |
Start use | 253 | FD | Request to start using specified option. |
Stop Use | 254 | FE | Demand to stop using specified option. |
IAC | 255 | FF | Interpret as command. |