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?
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.
telnet
response when the host appears reachable.
Nov 17, 2023 at 16:35
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.
There are two different things that can be the problem here:
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.