Ubuntu – How to enable telnet server

18.04telnet

I followed these instructions but when doing telnet localhost or telnet localhost 23, getting unable to connect to remote host: connection refused.
I also shut down firewall: sudo ufw disable.

When doing sudo /etc/init.d/xinetd status I get active (running)

I can do telnet to the internet e.g. telnet google.com 80 (I know this is telnet client)

More information: version 18.04.1 TLS, running on Oracle VM VirtualBox.

Best Answer

Create following file:

vi /etc/xinetd.d/telnet

content:

service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}

restart service. I think this does the trick.

Related Question