Ubuntu: How to disconnect a telnet session

  If you haven’t used telnet much you might expect ctrl+c or ctrl+d to cancel a command and return you to the prompt. Try instead:  
ctrl+]
  Once you are back at the telnet prompt you can exit back to your shell using ctrl+d.