Как выйти из telnet linux
Перейти к содержимому

Как выйти из telnet linux

  • автор:

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

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)”

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)

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

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

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

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

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

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

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

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

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

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

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:

Quitting telnet on Linux

prompt. What setting hinders me to escape telnet this way?

EDIT: I omitted one key ingredient: I use MobaXTerm. I tried on putty and CTRL-5 worked with 5 from the alphanumeric keyboard. MobaXTerm might swallow CTRL-5.

1 Answer 1

Press the correct 5 key.

There are two 5 keys on your keyboard, one at position E05 and one on the numeric keypad, wherever that happens to be (either a separate keypad or an overlain keypad accessible with a Fn key or similar). You are pressing the wrong one.

It does not matter that you have a Hungarian keyboard. The engravings on the keytops do not control what actions the keys cause. What matters is that you are using a Hungarian keyboard mapping such as hu101.kmap (on Linux operating systems).

In that keyboard mapping only one of the 5 keys produces the ␝ character in conjunction with the ⎈ Control modifier, the key at position E05. ␝ is of course the local escape sequence for the telnet program.

In that keyboard mapping the other 5 key, on the numeric keypad, produces the XTerm control sequence CSI 1 ; 5 u that you are seeing; which denotes the 5 key on the numeric keypad, in «application mode», occurring once, with the ⎈ Control modifier.

Не могу выйти из Telnet? Вот решение!

Я из тех администраторов, что для проверки того, что определенный порт открыт, я редко думаю, что это первый вариант в птар о ан nc (хотя эта секунда создана специально для этого), годы приучили меня использовать Telnet.

Проблема в том, что когда я обращаюсь к порту с помощью telnet, и он открыт, ну, порт открыт . но тогда проклятый telnet меня не отпускает, не отпускает . ¬_¬ … Как бы сильно я ни нажимал Ctrl + C, я получаю только ^ C в терминале, но никакого прогресса для выхода.

Решение?

Все просто, мы должны нажать Ctrl +]… да да, Control и, не отпуская ее, нажимаем закрывающую скобку ��

Это отобразит терминал или консоль telnet, в которой мы пишем quit и нажимаем Enter.

Telnet

Теперь что нам будет приятнее жить? ��

Не знаю, как вы, но мне совсем не нравилось закрывать терминал (или вкладку), потому что проклятый телнет не позволил мне уйти . теперь нет, больше никакой тирании телнетов !! ^ — ^

Ну ничего, это что-то простое, но черт побери, помогает, наслаждайтесь!

Содержание статьи соответствует нашим принципам редакционная этика. Чтобы сообщить об ошибке, нажмите здесь.

Полный путь к статье: Из Linux » Рекомендованный » Не могу выйти из Telnet? Вот решение!

How to close telnet terminal in Linux and Windows (quit, exit not working)? Example

The telnet is one of the most useful Linux networking commands, which is used to check if a server is listening on a particular port and it’s whether up and running or not, but it’s a little bit tricky to use, especially, if you are not using it on daily basis. Though I have used telnet before, when I use it after a long time, I actually forgot how to close the telnet terminal and how to get out of it. I tried every possible Linux commands I can think of which is used to close, cancel a command, or exit from VIM editor in UNIX, like Ctrl + C, quit, exit, q! and even the escape character ‘^]’, only to realize that nothing is working. It may sound silly that an experienced developer cannot even come out of a telnet terminal but this is a true story.

What I have noticed in general is that, even though we learn new things when our experience grows, we actually forget something equally important as well, particularly if we don’t use that thing or command on daily basis.

Our mind is trained to keep only important stuff in memory, if a particular thing, particular knowledge or concept is not used for a long time and doesn’t find very important something like life or death, it slowly offloads it. The trick here is to revise and reuse it once in a while.

I finally managed to come out from the telnet command prompt after a bit of struggle, and trial and error but I was surprised how difficult it can be to use one of the top 10 networking commands in UNIX.

So, not to forget again and to help anyone who is stuck in the same situation, I decided to share my thoughts in this post.

Let’s see the exact command to close the telnet terminal in Linux and Windows 10. Though, keep referring a good UNIX command course like Linux Command Line Basics not to forget important commands like telnet.

How to close telnet terminal in Linux and Windows

Before looking at how to come out of the telnet command prompt, let’s first look at how not paying enough attention and thinking that every command will work same way can confuse you easily.

You can see below that I had tried everything I could to come out of telnet windows but nothing worked, but had I paid attention to the telnet message that » Escape character is ‘^]'» , I would have probably been able to come out of telnet terminal earlier.

The trick here is you need to first type escape character e.g. ‘^]’ which is ‘Ctrl + ]’ and then type quit to close the telnet terminal in Linux or any UNIX system.

I expect the same command will work on Windows and Mac also as telnet is ubiquitous and you will find telnet command in a host of the operating system including the big three e.g. Linux, Windows, and Mac. See these Best Websites to learn Linux for FREE to learn more about basic commands like telnet command in UNIX/Linux.

How to close telnet terminal in Linux and Windows (quit, exit not working)

Here are the exact steps to end a telnet session in Linux and Windows :

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.

The telnet is an extremely useful command and is used a lot in client-server applications e.g. you can use this to solve connection refused error in Java, which is mostly due to incorrect client-server communication.

In the electronic trading and FIX protocol world, telnet is a great tool to diagnose FIX session connection issues as described in this article.

How to come out of telnet command prompt

You can even use telnet to check if your own HTTP server is running or not as I have discussed when talked about building HTTP server in Java, here.

That’s all about how to exit from the telnet terminal on Windows or Linux. As I told its one of the must-know networking commands and is available on almost all operating system. When you don’t use it regularly sometimes it becomes tricky to operate as shown in this article, but just remember that you need to first type escape character to actually type command in telnet, while it is connected to a server.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *