Q. Can you example how can I install telnet service or server under Linux or FreeBSD operating system?
A. TELNET (TELetype NETwork) is a network protocol used on the Internet or local area network LAN connections.
The telnetd program (telnet server) is a server which supports the DARPA telnet interactive communication protocol. Telnetd is normally invoked by the internet server inetd or xinetd for requests to connect to the telnet port as indicated by the /etc/services file. Usaually telnet listen on port TCP port 23.
Telnet in is insecure protocol and it is recommended that you use ssh server. But some time you really need telnet then first install telnet server as according to version of Linux distribution.
Telnet server installation
Debain/Ubuntu Linux user type the following command:
# apt-get install telnetd
OR
$ sudo apt-get install telnetd
Fedora Linux user the following command:
# yum install telnet-server telnet
Red Hat enterprise Linux user type the following command:
up2date telnet-server telnet
FreeBSD user type the following command:
No need to install new (telnet server) package, it is installed by default (/usr/libexec/telnetd)
Configure telnet server (turn on telnet server)
Again each distribution has its own method to turn on or off telnet service; same applies to telnet UNIX/Linux server.
If you are using Red Hat / Fedora Linux
The configuration file for telnet is /etc/xinetd.d/telnet. To enable telnet server you need to open this file and make sure disable = no read as disable = yes.
Alternately,
# chkconfig telnet on
To start telnet server type command:
# /etc/init.d/xinetd restart
If you are using Debian Linux
The configuration file for telnet is /etc/inetd.conf. By default it is enabled when you install telnet server. To start telnet server type command:
# /etc/init.d/inetd restart
If you are using FreeBSD
The configuration file for telnet is /etc/inetd.conf. Open file using vi text editor and uncomment line:
# vi /etc/inetd.conf
Make sure commented line:
#telnet stream tcp nowait root /usr/libexec/telnetd telnetd
Read as follows:
telnet stream tcp nowait root /usr/libexec/telnetd telnetd
Save and close the file. Start telnet service:
Enable inetd service so that telnet get loaded:
# vi /etc/rc.conf
Append/add following line to configuration file:
inetd_enable="YES"
Save and close the file, Rsstart telnet via inetd service:
# /etc/rc.d/inetd restart
Telnet to server (How do I use telnet client?)
You should now be able to telnet to the server from Windows or Linux desktop system. Type the following command to connect to Telnet server:telnet server-ip-address
telnet 192.168.1.5
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 40 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Thanks, man! That was really helpful! I have been looking for a telnet manual like this a long time.
thank you very much ….that is help full
Thanks alot
dear sir,
i am asghar jan from pakistan.sir i am the bigenner of linux. i need ur help with supporting docoment and speacially linux commond.
thanking you
Thanks!
what should we do if there is no telnet file in redhat linux 9… and how to install the same if its not there..
u insert linux dvd ok,in command prompt #mount /dev/cdrom /mnt
#cd /mnt
#cd Server
#rpm -ivh telnet*
#cd /etc/xinetd.d/
#ll
#vi telnet
disable = yes (u change that one as no,and save a file)
#/etc/init.d/xinetd restart
#telnet servername
it works ok.
so simple… so necessary. Thanks
# chkconfig telnet on
# service xinetd reload
these both commands are useful on RHEL 4
thanks alot , this document is very helpful & i am able to find solution for my prlm, thanks
Thanks a lot! I used it for Fedora 6.0.
Thanks a lot!
Most people should be aware using telnet is *VERY* bad practice for remote administration. It’s transmission is unencrypted and is therefore very insecure. SSH is by far a more robust, offers additional features, and is by design more secure. It would be available in redhat distros via yum install sshd or debian based distro via aptitude install sshd
This is the single-most irresponsible piece of documentation I have ever seen. Without a long explanation, NEVER do this. If you are new enough to administrating a *nix (Linux, UNIX, BSD) machine that you aren’t familiar with your system’s package management system in almost all circumstances you are not qualified to start or maintain a service that publishes system credentials in plain text. Your system probably already has SSH and starts it by default.
FYI even the sshd is not installed as default.
Yes telnet is unsecure, but boy is it handy.
For an internal LAN in a small office, I use it.
You can use it from any PC with having to install any package.
this worked for me ubuntu 7.10
sudo apt-get install telnetd
sudo /etc/init.d/openbsd-initd restart
FYI to enagle sshd I used
sudo apt-get install openssh-server
john fraize proves my point entirely, I suppose he has reason to believe that his LAN traffic has never been analyzed, and that the Windows machine he had to re-image last week because of a virus couldn’t have possibly given anyone interested in his traffic system credentials on his Linux box, but in real-life these aren’t valid assumptions …
to start telnetd in my debian lenny i had to use /usr/sbin/in.telnetd , or sudo in.telnetd, after installing telnetd with apt.
Thanks for the guide, I got telnet installed and running on a remote server in less than 5 minutes thanks to this.
inredhat linux i want to telnet config
The above info is very useful… it helped me … so thanks for posting…
thank you for your useful configuration
how to configure more than 100 telnet ip address
it wiil be only connecting 40or50
Your article was really helpful
lot of thanks
i found the aforementioned tips to be really useful…
thank you .
hellow sir i am ramesh bigenner how to configure more than 60 telnet ip address
it wiil be only connecting 40or50 please sent my mail address
Thanks that was really helpful
Hi i am not able to enable Telnet service in my PC even i Used sudo apt-get install telnetd command in Ubuntu 9.04, is anything i need to install in the system to enable Telnet in my PC
I got the following error while installing xinetd service
Header V3 DSA Signature NOKEY,key ID 37017186
Give me steps to start the telnet service on Red Hat Linux
i was installed windows and Red Hat in bot pc how can i mount the ntfs file in my linux os
To install telnet in Debian Lenny (debian 5) yo have to do:
apt-get install telnetd
/etc/init.d/openbsd-inetd restart
I am a Ubuntu user, I am not able to use telnet, please let me know how it works.
I am getting following error …
#sudo apt-get install telnetd
sudo] password for ubuntu:
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package telnetd
I have the same problem that Swamy.
E: Unable to locate package telnetd.
I have Ubuntu Server 10.10 in a VM over Windows with the network configured in Bridge mode.
Please any help or direction will be welcome.
Thanks in advance.
this is very user full for me
=> Click Application > Accessories > Terminal
=> sudo bash
=> apt-get install xinetd telnetd
=> After Downloading this package
=> gedit /etc/inetd.conf
write this syntex in this file
Syntex = telnet stram tcp nowait telnetd /usr/sbin/tcp /usr/sbinin.telnetd
after saving this file
=> service xinetd restart
=> gedit /etc/xinetd.d/telne
service start
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /user/sbin/in.telnetd
log_on_failure += USERID
}
=> service xinetd restart
enjoy the telnet service
people with the same problem as Swamy and RCruz:
you actually need to do a
sudo apt-get install inetutils-telnetd
can u tell me what is problem while giving my bt login and password it is not allowing to enter giving login failure
thanks for your suggestion
sir,
I can connect to unix sco server through pc by using telnet but i am not able to connect it through my hcl thin clients. kindly suggest how do i connect to my unix server through telnet
from my thin clients
thanks a lot in advance
how to install in dns package in rhel6 linux plse guide step and step ?