0

My localhost(127.0.0.1) 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
  • 1
    netstat -anltp | grep "LISTEN" > output & update ur ?
    – One Zero
    Feb 1, 2012 at 7:13

3 Answers 3

5

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.

2
  • 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, 2012 at 7:42
  • Downvoted because it's not what they asked. OP did not ask what you believe he "should do", he asked a very simple question asking what problems could cause this telnet response when the host appears reachable. Nov 17, 2023 at 16:35
0

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.

1
  • This doesn't answer the question at all, should be a comment at most. Nov 17, 2023 at 16:36
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .