42

Connecting with telnet looks like this:

$ telnet some.host
Trying 10.1.2.3...
Connected to some.host.
Escape character is '^]'.

I'm running this on the OS X Leopard terminal. Question is, how do I send this escape character? On a Linux terminal I'd try ESC-5 or CTRL-5, but I cannot figure out how to do this on OS X.

70

The ^] means ctrl + right bracket. As strange as that is, it works. You'll be taken to the telnet prompt, where you can type quit.

On international keyboards the ] character is often not a single key, and needs to be replaced with some other key. The correct key is typically the key to the right of P or the next key after that.

Here's a list based on comments below:

  • Finnish, Swedish, Norwegian, Danish: ctrl + å
  • French: ctrl + 6
  • German: ctrl + ü
  • Swiss: ctrl + ¨
  • Hungarian: ctrl + 5
  • Portuguese: ctrl + ´
  • Dutch, Belgian: ctrl + $
  • Canadian French: ctrl + ç
  • 5
    Ahhh, of course. Except that with my Finnish keyboard layout, it's control + å. Naturally. Thanks :) – Ville Laurikari Jul 15 '09 at 8:53
  • 1
    And on the french keyboard it’s ctrl-6. – kmkaplan Feb 5 '11 at 18:58
  • 3
    On German Keyboard on OSX it is CTRL-Ü (Umlaut U) – user92238 Jul 29 '11 at 18:54
  • 1
    On a Swiss Keyboard it is Ctrl-¨. Why o why did the telnet developer need to use the group separator GS. So difficult to type on foreign keyboards. – Martin May 8 '12 at 15:31
  • 4
    on Hungarian (and many more) it is Ctrl+5 – törzsmókus May 15 '12 at 10:13
1

Workaround for those who have problems finding the shortcut:

  1. Change your systems keyboard language to U.S international - PC (System Settings/keyboard/input sources)

  2. Look at an image of a US keyboard layout and ctrl+] the corresponding keys on your keyboard

protected by Community Jul 29 '11 at 20:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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