How to send the escape character on OS X terminal?

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.


Solution 1:

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 + ç
  • Italian: ctrl + +

Solution 2:

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