Telnet - How Do I End a Telnet Session (Windows, Linux, Mac)

How do I close a telnet session/window?

This article assumes that you've started a telnet connection through the Windows command prompt (you can do so by typing: "telnet address port").

Answer: To end your current telnet session you must reach the telnet prompt and type quit.

Here are the steps for doing so:

  1. Open the telnet prompt by holding down the 'Ctrl' key and push the ']' key. (prompt: Microsoft Telnet>)
  2. Type quit.
  3. Push the 'Enter' key.

You can change this default telnet prompt key by starting telnet like this: telnet –e p 192.168.1.81(this will change the telnet prompt key to lowercase 'p')

12 Responses to “How to end a telnet session (Windows, Linux, Mac)”
  1. Nik says: Hey, Thanks a lot. I had opened a telnet connection and had no idea how to close it until I came across this! By the way, I am logged in Ubuntu. So the steps you have mentioned for windows work for linux as well.

    January 1, 2010 at 2:05 am (Edit)

  2. Cpascu says: Good to know, changed the title accordingly :)

    January 12, 2010 at 11:36 am (Edit)

  3. Thomas says: Hi, great post, could you please mention, that this also work with other key mappings? e.g. on german keyboards the ‘]’ is a composed key, but the same key position as on english keyboards works: use [Ctrl] + [+] there. Regards, Thomas

    January 28, 2010 at 12:20 am (Edit)

  4. M L Sreekanth says: THANKS ALOT…… Every time i used to close the window or putty to come out of the session.

    May 7, 2010 at 2:59 am (Edit)

  5. Jimmy says: This is HELPFUL! I’m on mac OS X 10.6.6 and the same key commands work to get the prompt so that you can properly close the window. You could add Mac to the title of the page, too! Thanks!

    February 17, 2011 at 5:28 am (Edit)

  6. Neetish Jehra says : Thanks very handy!

    May 31, 2011 at 3:26 pm (Edit)

  7. Omo Olorun says: Nic eone, thanks.

    July 3, 2011 at 11:46 pm (Edit)

  8. Sameet says: So I am curious as to What Ctrl+C does not do that this does or are they the same. What I am trying to get at is does Ctrl+C leave open/lingering connections

    November 26, 2013 at 8:48 am (Edit)

  9. Uro says: For non English keyboard you can press and hold Alt key then enter 29 on num keypad. This will send ‘^]’ control character to the terminal according to the ASCII table.

    December 17, 2013 at 3:56 am (Edit)

  10. Shilpa says: How to kill a telnet session, when the telnet console window is closed mistakenly.

    August 27, 2014 at 3:47 am (Edit)

  11. Nene says: Thanks a lot, it helped me a lot.

    September 30, 2014 at 7:25 am (Edit)

  12. MJ says: in linux, I type echo|telnet server_ip tcp_port this will help me not to enter the escape character but will end the telnet session be it good or bad. What is similar option in windows?

    February 17, 2016 at 4:00 am (Edit)

Did you know that we also do BACnet Integration Solutions?

Chipkin has BACnet solutions for almost every situation. We have over 20+ years of experience in BACnet integration, check out our BACnet Products:

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm