Gerald Combs wrote:
Brian Kelsay wrote:
Gerald Combs wrote:
bam:/home/gerald> telnet kclug.org 25 Trying 139.146.133.42... Connected to kclug.org. Escape character is '^]'. 220 kclug.org ESMTP Postfix (Debian/GNU) quit 221 Bye Connection closed by foreign host.
Umm, why is telnet running/responding on the server?
I'm not sure if telnet is running on the server, but Postfix is responding on port 25. Most telnet clients allow you to specify a port number after the host name. If you specify a non-standard port from Telnet's perspective (not 23), the telnet client just opens a direct ("raw") connection (normally it tries to exchange environment information upon connecting). At this point you're just pushing bytes at the server, like any other TCP client. Since a bunch of popular TCP protocols are text-based, this means you can interact with the server manually.
This has several uses, including the ability to apply Occam's razor in a troubleshooting situation. If someone is having trouble connecting to a web server, you can run
Sorry, I didn't get a good look at the port.