My localhost( is reachable by Ping, and no problem with wget.

But, when I try "telnet local host" or "ftp localhost", connection is refused. How do I fix this problem?

  • 1
    netstat -anltp | grep "LISTEN" > output & update ur ? – One Zero Feb 1 '12 at 7:13

Telnet and FTP are two very old protocols that aren't recommended unless you absolutely have to use them. If you do, then you'll have to install them, since they're not used by default. But what you should do, is to install OpenSSH Server. It will allow you to securely connect to your machine from other computers, get a secure shell or share files. SSH can also be used for a lot of other things.

| improve this answer | |
  • Just be sure to look at securing your ssh server. Personally I either firewall it to the LAN only or use keys and disable password authentication. – Panther Feb 1 '12 at 7:42

J-E Schinstad is dead-on. Unless you're using something like an old Palm smartphone where it's just too hard to find a SSH client, there is no benefit to using Telnet and FTP rather than SSH and SFTP. Using SSH rather than legacy protocols is not just more secure, but it gives you other handy options like flexible port redirection (good for bypassing overly conservative firewalls) and stream compression. On top of this, it's actually easier to configure because the default settings for the SSH server can be pretty open without causing a gaping security hole, wheras the default telnetd configurations that Ubuntu provides have to be locked down pretty tightly.

| improve this answer | |

There are two different things that can be the problem here:

  • For any network service to run on a given port, there must be code ready to accept connections. For telnet it is telnetd, and for ftp it is ftpd. Both are usually started by inet.d or the equivalent daemon manager.
  • Even if such a service is running, there might be firewalls in between blocking access. This can both be on a network device like a router, or on the machine itself. These rarely refuse connections though, but rather just drop packets giving timeouts instead.

Your system is most likely not configured for either telnet or ftp. You will need to either ask the administrator, or - if you - consult the documentation to see how to enable it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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