2

Following is the sequence:

  • Telnet from a terminal session to a remote linux machine, Call it A.
  • Telnet to some device, Say B, that is accessible only from A.

Now, How do I quit the telnet session to B and stay live on A?

3

Using the inetutils version of telnet client, you can use the send escape command:

a$ telnet b
  b$ telnet c
    c$ ^]
telnet> send escape
  telnet> q
  b$

Or use the logout/disconnect command of C:

a$ telnet b
  b$ telnet c
    c$ exit
  b$

And stop using telnet, damn it.

  • 2
    the first solution worked for me,... and I can not use logout or exit because c is not a linux machine, its an embedded box... – Mallik Mar 7 '12 at 5:22
1

Could you use a different escape sequence when logging in to either A or B? For example,

telnet -e ^Q A
telnet B

gives you ^Q on A and ^[ on B.

  • Thanks for the solution, But the problem is I am not using telnet program directly, but it is being used inside the script that I use to log in to the box... Thanks anyways... – Mallik Mar 7 '12 at 5:20
  • 1
    You should be able to change the escape character from the escape mode as well: press ^], tell telnet to set escape ^Q (or whetever) and carry on. – taneli Mar 7 '12 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.