I've been learning about socket programming recently, and am just beginning learning about tcp/ip sockets. My study material gives an example of connecting to the localhost
daytime service by running
telnet 127.0.0.1 13 with the expected result that a telnet session should be opened. I have an entry for "
daytime 13/tcp" in my
/etc/services file, and I have the
xinetd service running, but when I try the telnet command, I immediately get "Connection refused".
Q: why doesn't telnetting to the daytime service work?
Q: are there other localhost services that would accept a telnet connection? I tried to telnet to a random selection of services that had
tcp entries in
/etc/services, but all of them gave the same "Connection refused" error.
My short-term goal is just to replicate my study material's successful telnet connection to a localhost tcp service - if not
inetd, then anything else; I just want to learn by practice.
>telnet 127.0.0.1 13 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused >telnet 127.0.0.1 49000 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused >telnet 127.0.0.1 9009 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused >uname -a Linux linuxbox 3.11.10-301.fc20.x86_64 #1 SMP Thu Dec 5 14:01:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux