Telnet connection had been closed by a foreign host
8
votes
4
answers
70548
views
The
client PC IP: 10.49.46.5/24
and the server PC IP: 10.49.46.2/24
are two computers linked to the same network.
When I try to create an interactive communication between these two computers using the command telnet
, I get the following:
[root@xxx:~]# telnet 10.49.46.2
Trying 10.49.46.2...
Connected to 10.49.46.2.
Escape character is '^]'.
Connection closed by foreign host.
[root@xxx:~]#
The server xinetd.conf
are as follows:
defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID EXIT
log_on_failure = HOST ATTEMPT
cps = 25 30
}
includedir /etc/xinetd.d
The server telnet.config
are as follows:
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/telnetd
log_on_failure += USERID
instances = 10
disable = no
}
The TCPWrapper hosts.allow
are:
telnetd: /etc/telnetd.hosts
tfdpd: /etc/tftpd.hosts
sshd: /etc/sshd.hosts
The TCPWrapper hosts.deny
are:
ALL:ALL
NOW:
1. I checked ssh
and it is running on port 22
.
2. I checked /var/log/message
and had found that the command xinetd
starts and then exits the telnet immediately.
3. I checked that iptables
do not drop telnet package using the command: iptables -L
Would you please help me figure out what is the problem and how can I fix it?
Asked by Yuri
(81 rep)
Sep 23, 2017, 08:12 AM
Last activity: Nov 22, 2021, 11:23 AM
Last activity: Nov 22, 2021, 11:23 AM