
Telnet (Network Virtual Terminal Protocol):
- Used to work remotely on a computer, router and switch etc.
(You can install and configure telnet in your computer, router and switch etc so that you can work on them from other computers in a network) - It provide insecure communication (as data packet flow in plain text (unencrypted), if any hacker captures the data packet they can read it)
- Port no. - 23
Telnet Server Configuration (RedHat/CentOS):
In this scenario:
IP Address of Telent Server = 192.168.1.111
1. First install the required package (telnet-server):
yum install telnet-server
2. Edit telnet configuration file (telnet) located in /etc/xinetd.d:
vim /etc/xinetd.d/telnet
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
Note: In above configuration file just replace disable = yes with disable = no
3. Start the required service.
service xinetd start
4. Set xinetd to automatically start at boot time.
chkconfig xinetd on
Note: By default root login for telnet connection is disable. To enable it take following steps:1. Edit /etc/securetty file to add pts/0 to enable one telnet session for root. if you need to open more telnet session for root and add more pts/1 pts/2 and so on.
vim /etc/securetty
#add following at the end of file#pts/0
pts/1
pts/2
2. Restart xinetd service.
service xinetd restart
Connecting Telnet Server from the other computer in a network:
1. If you want to connect Telnet Server from Linux Computer you, run following command in Linux Terminal.
telnet <ip address of telnet server>
telnet 192.168.1.111
[root@wpc ~] # telnet 192.168.1.111
Trying 192.168.1.111...
Connected to 192.168.1.111 (192.168.1.111).
Escape character is '^]'.
CentOS release 5.4 (Final)
Kernel 2.6.18-164.el5 on an i686
login: user1
Password:
[user1@wpc ~]$
Note:
Type any username and it's password other than root when login is prompted, and if you want to work as a root simply use su - command to switch to the root user.
2. If you want to connect Telnet Server from Windows Computer, run the same command at Command Prompt.
telnet 192.168.1.111
Configure telnet server on custom port number:
First configure your Telnet Server as above, then edit /etc/services and replace the standard port 23 with your custom port number (for example: 1024)
telnet 1024/tcp # Telnet
telnet 1024/udp
Connecting Telnet Server on custom port number (for example 1024):
telnet 192.168.1.111 1024
Where 192.168.1.111 = IP Address of Telnet Server, and 1024 is its telnet port number
Telnet Server Configuration (Video):





