telnet error even on new server

December 12, 2016 4k views
Ubuntu Apache DNS Firewall VPN IPv6 Deployment


I can’t do telnet to any server or to my localhost.

->>telnet localhost 2181
telnet: Unable to connect to remote host: Connection refused

How can i disable the firewall ?

1 Answer

Telnet is not enabled by default, neither is firewall.

If this is new server, you need to access it using SSH,
How To Connect To Your Droplet with SSH will show you how to do so.

Once you get into Droplet, you can find out how to install telnet, but:
WARNING: Telnet is insecure protocol and is not recommended to be used! All data you send to server using telnet (including passwords) are sent in plain-text form, unencrypted. SSH is encrypted and much more secure than telnet.

If you already logged in, installed telnet but you followed Initial set up tutorial (incl. Step 7), then you have enabled UFW firewall. To check is it enabled run:

  • sudo ufw status

In case it’s enabled just allow:

  • sudo ufw allow 23/tcp

But if you didn’t set up telnet manually, you need to do so (not recommended).

by Melissa Anderson
DigitalOcean Droplets are managed using a terminal and SSH. SSH is an encrypted network protocol for remote server login and command execution. It is the standard method used for accessing and interacting with Linux servers. This tutorial shows how to connect to a DigitalOcean Droplet for the first time by using the OpenSSH client.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!