configure telnet server, 텔넷 서버 설정하기
Configuring a Telnet server on a Linux system involves installing the Telnet server package, enabling the Telnet service, and configuring access. Here are the step-by-step instructions for setting up a Telnet server.
1. Installing Telnet Server
For Ubuntu/Debian-based Systems:
Install
telnetd
(Telnet daemon):sudo apt update sudo apt install telnetd
Install the
xinetd
service manager (if it's not already installed):sudo apt install xinetd
For CentOS/RHEL-based Systems:
Install the
telnet-server
package:sudo yum install telnet-server
Install the
xinetd
service manager:sudo yum install xinetd
For Fedora:
Install the
telnet-server
package:sudo dnf install telnet-server
Install
xinetd
:sudo dnf install xinetd
2. Configuring Telnet
Once Telnet and xinetd
are installed, you need to configure xinetd
to manage the Telnet service.
Configure the Telnet service in xinetd: Edit or create the configuration file
/etc/xinetd.d/telnet
using a text editor likenano
:sudo nano /etc/xinetd.d/telnet
Add or modify the following configuration:
service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID disable = no }
Save and close the file.
3. Enable and Start the Telnet Service
For Systemd (Most modern Linux distributions like Ubuntu 16.04+ and CentOS 7+):
Enable and start
xinetd
:sudo systemctl enable xinetd sudo systemctl start xinetd
Verify that the Telnet service is running:
sudo systemctl status xinetd
For older init systems:
On older systems (pre-Systemd), use the following:
sudo service xinetd start
sudo chkconfig xinetd on
4. Opening Telnet Port (Optional)
By default, Telnet uses port 23. If you have a firewall enabled (like ufw
or firewalld
), you need to open this port.
For UFW (Ubuntu/Debian):
sudo ufw allow 23/tcp
sudo ufw reload
For Firewalld (CentOS/RHEL/Fedora):
sudo firewall-cmd --permanent --add-port=23/tcp
sudo firewall-cmd --reload
5. Verify Telnet Server
To check if the Telnet server is functioning correctly:
On the same machine:
telnet localhost
From another machine:
telnet <Telnet-server-IP>
6. Security Considerations
Telnet is an insecure protocol because it transmits data, including passwords, in plaintext. It's advisable to use Telnet only in trusted environments. For secure remote connections, it's better to use SSH (Secure Shell).
If you still need to use Telnet, consider using a VPN or other secure tunneling methods to encrypt the Telnet session.
댓글
댓글 쓰기