Solved

Telnet login

Posted on 1998-10-16
7
252 Views
Last Modified: 2010-08-05
Hi,
I'm wondering what UNIX servers send you when you log on.  I wrote an WinSock program that connects to a UNIX (AIX) server.  When I connect, it sends me three bytes:
FF FD 18
I didn't know what to do so I just echoed them back and it sent me three more bytes:
FF FC 18
So I echoed those back as well.
This was good in that it got me the login string but that string was preceded with about ten bytes of non-ASCII characters.
It was a wild guess that got me to the login prompt but I'd like to know what all of this non-ASCII data represents, I was expecting to just get a bunch of strings, carriage returns, and line-feeds...
This is my first socket program.
I have no experience in sockets or programming for networks, just a lot of reading.
Thanks
0
Comment
Question by:bod_1
7 Comments
 
LVL 1

Expert Comment

by:shirlng
ID: 2007489
Have you checked the Port and the Terminal Type from the Remote System?
0
 
LVL 2

Expert Comment

by:seedy
ID: 2007490
FF indicates the IAC(interpret as command character).  The next few bytes will be the command and any associated options.  Bascially the telnet process on the AIX server is trying to negotiate some options.  Also normally the AIX tries to clear the screen before presenting the login prompt.  This is done by sending a series of 0x0A characters before the prompt.

For more info. on the telnet protocol, please refer to RFC-854.
0
 

Author Comment

by:bod_1
ID: 2007491
Thanks guys,
I the port that I am using is telnet (it is resolved from it's name and corresponding port from some file, I forget it's name right now).  Terminal type ?  Is that what it's doing?  Seeing what kind of terminal I am (dumb, VT...) ?
I got a buch of 0A's (line feed) after that too.  I noticed that while using WS_FTP program, every command echoed to the debug window has a number infront of it.  I suppose these numbers are command codes?
I am looking at RFC now;

Thanks again
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Expert Comment

by:seedy
ID: 2007492
WS-FTP will display the commands of the protocol FTP.  
You would not want to confuse that with the telnet protocol you are interested in.
0
 

Author Comment

by:bod_1
ID: 2007493
I just installed Linux and got it configured.  man, what I'm looking for will be right on my machine now too.
I have much reading to do.
0
 
LVL 4

Accepted Solution

by:
davidmwilliams earned 50 total points
ID: 2007494
 I just typed a lengthy reply and Experts Exchange erased it because it was too long ! :(  So here's another go ...
  Whenever a client or server wants to send a command sequence instead of normal data, it inserts a special reserved character into the stream ... IAC ... which means 'Interpret as command'.
  Now, when telnet connects to a server, some negotiation goes on.  The two ends can request features of the other, or offer features.  For example, they will negotiate over which side performs echoing.  Also, some systems may offer to transmit characters as 8-bit uncoded bytes.
  The sequence is    IAC  verb  option    where verb is DO or DONT, encoded, and the reply is   IAC  verb  option  where verb here is WILL or WONT.
  What you describe seems to me like your server offered to do echoing, and you then sent the request right back :)  So the second message you received, with the differing byte, is because it then sent you a confirmation to your message, honouring the request you made of it :)
0
 

Author Comment

by:bod_1
ID: 2007495
Cool,
That makes sense.

Thanks for the help guys
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now