Closing a telnet session

How to close a telnet sessionHere’s a tip for you command line people. When you use telnet to access a service on another machine, have you ever wondered how to get out of your telnet session? Let’s say we used telnet to check an SMTP host:

# telnet someserver.somehost.com 25
Trying 01.02.03.04…
Connected to someserver.somehost.com.
Escape character is ‘^]’.

We know from the clue above that we need to press ctrl and the right bracket to stop the session, but what happens then?

We see this: telnet>

So now what? Simply type the word “close” and hit the enter key.

telnet> close
Connection closed.

Easy as pie!
Beth