TELNET連接淺述
TELNET連接,可以有效管理遠(yuǎn)程服務(wù)。是我們遠(yuǎn)程登錄比用的一個(gè)協(xié)議。盡管有一些不安全的因素,但是我們還是需要使用這個(gè)協(xié)議。那么接下來(lái)詳細(xì)介紹一下這方面的知識(shí)。TELNET:TCP/IP Terminal Emulation Protocol
TELNET是 TCP/IP 環(huán)境下的終端仿真協(xié)議,通過(guò) TCP 建立服務(wù)器與客戶機(jī)之間的連接。 連接之后, TELNET服務(wù)器與客戶機(jī)進(jìn)入?yún)f(xié)商階段(決定可選項(xiàng)),選定雙方都支持連接操作,每個(gè)連接系統(tǒng)可以協(xié)商新可選項(xiàng)或重協(xié)商舊可選項(xiàng)(在任何時(shí)候)。通常 TELNET任一端盡量執(zhí)行所有可選項(xiàng)以實(shí)現(xiàn)系統(tǒng)***化性能。
一旦建立 TELNET連接,連接兩端在網(wǎng)絡(luò)虛擬終端(NVT)中可以發(fā)起或中斷。 NVT 是一種假定設(shè)備,它是對(duì)規(guī)范終端的標(biāo)準(zhǔn)的、泛網(wǎng)絡(luò)的、中間的表示,從而避免了“服務(wù)器”與“用戶”需要維護(hù)終端和終端處理范例等信息的需要。 協(xié)商可選項(xiàng)原則基于這個(gè)事實(shí):任何主機(jī)都希望在 NVT 上提供其它可用的服務(wù),以及任何用戶都有精良的終端設(shè)備和需要優(yōu)質(zhì)的服務(wù)。
一旦 TELNET連接建立,由于每一方都希望從另一方獲得盡可能多的服務(wù),連接雙方間的可選請(qǐng)求會(huì)不斷來(lái)回傳送。除此之外,這些可選請(qǐng)求還可用于動(dòng)態(tài)修改連接特性以適應(yīng)不斷改變的本地環(huán)境。
經(jīng)過(guò)過(guò)去 20 年左右的發(fā)展,當(dāng)前的 TELNET已經(jīng)是一種多功能仿真器。選項(xiàng)使 TELNET能傳輸二進(jìn)制數(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. |