Telnet => servname ai_socktype error

Ashish SHUKLA ashish at
Sat Aug 14 03:37:35 UTC 2010

jaymax  writes:

> telnet 0 smtp
> is the same as
> telnet localhost 25 
> or 
> telnet localhost smtp

% getent hosts 0           0
% telnet 0 25
Connected to 0.
Escape character is '^]'.
220 chateau.d.if ESMTP
telnet> quit
Connection closed.

I wasn't expecting this to even work. I hope this connecting to the wild-card
address only works on the same box.

And sorry I didn't know that connecting to actually connects to

But its interesting how 'getent hosts' returns an IPv4 address when given a
32-bit number as hostname.

Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0!ashish |

“A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away.” (Antoine de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list