Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Telnet login

Posted on 1998-10-16
7
Medium Priority
?
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 200 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

688 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