Solved

Telnet login

Posted on 1998-10-16
7
256 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
llcommand 6 111
Remote Change Dates on AIX Automation 7 87
unable to put logic for reading multiple repo in a single file 4 106
Linux "time" command output redirection 16 261
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 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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

752 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