Problem With Python Telnet Connection On TCP Server

Viewed 103

I have two scenario to communicate using Python Telnet:

  1. One is, host: '172.19.11.109' and port: 6008, it is RAW TCP connection and it works perfectly. No issues here.
  2. Another one is, host: '172.19.11.109' and port: 6004, it is TCP server and not working.

Here is sample code:

from telnetlib import Telnet
connection = Telnet('172.19.11.109', 6008) # raw tcp connection everything is ok!

connection = Telnet('172.19.11.109', 6004) # tcp server not working

What is the problem here?

0 Answers
Related