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
[Telnet 서버 기동하기]
/etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
/etc/xinetd.d/gssftp
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l
log_on_failure +=USERID
disable=no
}
# /etc/init.d/xinetd restart
or
#service xinetd restart
로 xinetd 데몬을 재시작해 줍니다.
그리고 텔넷은 보안상의 이유로 root의 접근을 거부합니다.
방법이 없는 것은 아니지만(/etc/securetty를 지워주면 root로 로그인 할 수 있습니다.)
root로 작업을 해야 한다면 일반유저로 접근하여 su 명령을 통해서 root로 작업하시거나 SSH(Secure Shell)을 이용할 것을 권장합니다.