exit telnet

Shell
#Ctrl+C doesn't work, you should ctrl+] but the most easy way
#is just type "quit" and enter
quit
Source

Also in Shell: