Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried telnet localhost on Mac OS X Lion, and this is the output I got.

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying fe80::1%lo0...
telnet: connect to address fe80::1%lo0: Connection refused
telnet: Unable to connect to remote host: Connection refused

It tries three different addresses. I would have expected it to only try 127.0.0.1, or at least to try it first. What are these other addresses?

share|improve this question
    
FYI this behavior has been around a long time. You can peek in /etc/hosts to see the entries for localhost. –  Dietrich Epp Mar 29 '12 at 6:03

3 Answers 3

127.0.0.1 is the (IPv4) localhost you are used to.

::1 is the IPv6 localhost address.

fe80::1%lo0 looks like a link-local IPv6 loopback address on the device lo0.

share|improve this answer

::1 is IPv6 equivalent of 127.0.0.1

fe80::1 is link-local IPv6 address (one per adapter).

share|improve this answer

Warning: Don't EVER run a telnet server on any system, always use sshd.

If your firewall goes down temporarily, even for a few seconds, there is a good chance someone can get in and hack your system.

When the world eventually moves to ipv6, many systems may be especially vulnerable as NAT and port forwarding won't offer any defence.

A telnet client however is useful for connecting to open ports for debugging.

share|improve this answer
1  
This doesn't address the question. Also it doesn't explain why a telnet server is bad (plain text). Just saying "Don't do X" without an explanation is not helpful. –  Burhan Ali Apr 7 '12 at 9:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.