This works on a Norwegian keyboard, but may apply to others.
So, your terminal says something like:
Connected to foo Escape character is ^]
So, ] is easily typed using “Alt Gr + 9” on my keyboard, but “Ctrl + Alt Gr + 9” does not produce an escape character.
However, “Ctrl + 5” does, for whatever reason. If you have a non-english keyboard, try using ^5.