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
From the Wikipedia page on telnet
...User data is interspersed in-band with Telnet control information...
So, to answer your question, yes, telnet does differ from a raw socket.
RFC 854 describes the telnet protocol if you want to try implementing it or you could use telnetlib if you'd prefer an existing python client.