The usage of telnet session is described here today. Here we mainly analyze the remote connection between hosts. Let's take a closer look at the specific exit operations of the nested telnet session.
Home
Assume that the port is from Atelnet to B, and then from Btelnet to C. Press "^] q" to return directly to A. Why? Is there any way to return to B?
Cause
O normal
/| \ --------> Telnet session ---> machine C
/\ Chars on Machine A chars On Machine B chars
O escape NOT forwarded
/| \ --------> Telnet session -- XXX ---> telnet session ---> machine C
/\ On Machine A On Machine B
Method 1: Set the escape characters of two telnet instances to different ones.
Do not use ^] As the escape Character
Method 2: Enable telnet session A to send escape characters to telnet session B.
Assume that the escape character is ^]
Step 1: Enter the command mode of telnet session ).
O ^] NOT forwarded
/| \ -------> Telnet session -- XXX ---> telnet session ---> machine C
/\ On Machine A On Machine B
Run telnet session A to send the escape character to telnet session B to enter the command mode of telnet session B.
O "send escape" ^]
/| \ --------> Telnet session-X-> machine C
/\ On Machine A On Machine B
Send the exit command to telnet session B
O 'q' 'Q'
/| \ --------> Telnet session-X-> machine C
/\ On Machine A On Machine B