Thats is because you dont send "telnet 18.104.22.168 -l user" to the server, that is what you tpye into your console.
that runs the telnet program which interprets the heap of junk that goes back and forth.
Either read up on the telnet protocol, or get a packet sniffer such as Wireshark
] and record the session to see what is sent.
To view the session in Wireshark:
1. Open a console window
2. Enter the telnet command (for mine I used "telnet towel.blinkenlights.nl") (Don't hit enter yet)
3. Open Wireshark and select the network adapter that the communication will go over to start listening
4. Go back to the console and hit enter, type stuff have a session then close the console
5. Hit stop capture in Wireshark.
6. Filter the packets to remove random things like DNS lookup and keepalives. For my filter I used "ip.src==22.214.171.124||ip.dst==126.96.36.199", because towel.blinkenlights.nl resolves to 188.8.131.52
Wireshark will present the data at the bottom of the window and tell you what each byte is.
A quick view and you will find that the control messages are sent in binary, and other stuff is sent in plain text.
I would also suggest using Wireshark for checking the dataflow of your own application to ensure communications are going smoothly