Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does telnet differ from a raw tcp connection

Tags:

I am trying to send commands to a server via a python script. I can see the socket connection being established on the server. But the commands I am sending across , do not seem to make it through(server does a read on the socket). The server currently supports a telnet command interpreter. ie: you telnet to the command address and port, and you can start sending string commands. My question is , is there anything fundamentally different from sending strings over a tcp socket, as opposed to using telnet. I have used both raw sockets as well as the Twisted framework.

like image 368
Pradyot Avatar asked Oct 04 '12 15:10

Pradyot


People also ask

What is a raw TCP connection?

Raw (TCP/IP) is an insecure communication protocol. When using this connection protocol with the provisioning system, anyone with network access to a server that has an N1 Service Provisioning System 5.1 application installed on it can connect to the provisioning system and issue commands.

Is Telnet a TCP connection?

TELNET uses the Transmission Control Protocol/Internet Protocol (TCP/IP) to connect to a remote system.

Is Telnet a TCP or UDP?

Note: Telnet is an application that operates using the TCP protocol. UDP connectivity can not be tested using Telnet.

What is Telnet and why it is used?

Telnet is a network protocol used to virtually access a computer and to provide a two-way, collaborative and text-based communication channel between two machines. It follows a user command Transmission Control Protocol/Internet Protocol (TCP/IP) networking protocol for creating remote sessions.


1 Answers

Telnet is a way of passing control information about the communication channel. It defines line-buffering, character echo, etc, and is done through a series of will/wont/do/dont messages when the connection starts (and, on rare occasions, during the session).

That's probably not what your server documentation means. Instead, it probably means that you can open a TCP socket to the port using a program like "Telnet" and interact with a command interpreter on the server.

When the Telnet program connects, it typically listens for these control messages before responding in kind and so will work with TCP/socket connections that don't actually use the telnet protocol, reverting to a simple raw pipe. The server must do all character echo, line buffering, etc.

So in your case, the server is likely using a raw TCP stream with no telnet escape sequences and thus there is no difference.

like image 80
Brian White Avatar answered Sep 25 '22 08:09

Brian White