tags:

views:

98

answers:

2

Is it possible to get the following information via Telnet?

  1. Software version
  2. config files
  3. config register
  4. information on traffic and errors

If you have sample code that you could share that would be really useful so that I can procceed further with your help .

I will be thankful for your valuable replies.

+1  A: 

Telnet is nothing more than a communication protocol to generally a shell interface on another Unix machine. The remote telnet daemon will most likely invoke authentication and shell processes so everything that you are requesting is yes, possible though you will thus require authentication.

As you know telnet for shell is primarily used internally inside secured networks and rarely on the 'net any longer.

Xepoch
ya u r exactly rite and if i am implementing or developing a telenet server then how can i provide the above details using telnet API....suppose a client asked for number of connections then i shuld respond him back with the exactly value so can i have any sample code from ur side ....thanks for ur answer
Telnet is simple, yet so ugly if you look at the RFCs http://www.omnifarious.org/~hopper/telnet-rfc.html . I would however not implement telnetd (that is already taken care of for you) I would instead implement a user program that would reply with the metrics being requested. Also take a look at `rsh`. To simplify even further just write a basic TCP daemon that responds to requests, telnet clients can connect to TCP ports arbitrarily in a dumb manner as it is.
Xepoch
A: 

Telnet is wrong protocol to do this kind of stuff. It is an (out-dated) protocol for interactive terminal sessions. You should be looking at "ssh" to execute commands on the remote machines, and then figuring out which commands you need to execute to extract the information of interest to you.

Some of the information you are after may also (in theory) be available using SNMP, but things like configuration files and application versions won't. The "ssh" approach will allow you to harvest any information that is available via commands run from the command line.

Injecting Java into the mix is almost certainly a bad idea. Java is best at tasks that are platform independent, but what you are trying to do is inherently platform specific.

Stephen C