The use of echo-e \"\\ 029\"
does not work either.
But if use strg + alt gr + ] directly in a terminal session -> it works.
It must be so. Because ^]
printed in the terminal on the server means for the client side nothing. The client must catch this symbol before it will be transmitted to server and of course you can't just write it to terminal in te program running on the server.
So you need to interrupt session in other way. There are many methods.
exit
in shell or sys.exit()
in python or exit()
in many other languages).kill ...
(PID of the process instead of ...
).kill ...
) but on the client side.