Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet, SSH application design.

Status
Not open for further replies.

kodr

Programmer
Dec 4, 2003
368
0
0
I've been putting off a project for a while now, that I really should get started (the new year seems like a good time to start.)

I'm just looking for any suggestions or guidance here, no specific code.

My goal is to build a basic framework for a Telnet, and maybe SSH capable application. I need to be able to log in to various pieces of network equipment and check for alarms, logs, etc.. This equipment is from multiple vendors, so at this point, I just want to build the framework that I could modify for each hardware type, then integrate them all together at a later point, once I have a better understanding of the whole process.

What I'm envisioning that I'll have to do is this:

Build a multi-threaded application. Have a thread dedicated to listening for incoming data. When data is received, set a flag so that another thread can process the data.

So the second thread would obviously be the data processing part.

A third thread would handle transmitting data to the equipment, a query on current alarms, login information, whatever.

I'm thinking that Sockets would be the best way to approach this also.

Anyone see any issues or have any comments? I'm willing to share any and all code for this as it progresses. What I'd like to end up with is a re-usable block of code that would be easy to modify for any similar type of application.

I know there are applications out there that do this, but my need requires a lot of custom responses based on the information received, and I wanted to use it as a learning experience.

Thanks.
 
From experience, telnet isn't a very 'standard' standard, and there are often subtle differences in the way various vendors implement it. It also sends passwords in plain text across the wire.

SSH is better but more complex to use because of the encryption - you may want to build on top of one of the open source packages out there, given that your goal is to gather information from your hardware, not rewrite SSH from scratch.

Check out your hardware to see if it can support communication at a higher level of abstraction like HTTP or HTTPS - my router and printer both respond to HTTP requests, and Java has much better support for this.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Steve, thanks. Passwords and such are not too much of an issue, as these accounts would be read-only, and the equipment not open to the Internet.

Dian, no, the main equipment that I want to connect to is TL1 driven and as far as I can tell, does not support SNMP, but it is definitely worth looking into. That begs the question, is there much support for SNMP in Java, any open source classes, or projects. I imagine there are, and I'll spend some quality time with google later.

Thanks.
 
The link I provided is a SNMP implementation for Java, but definitely it's not worth if your devices don't support it. I mentioned it because it used to be the specific protocol to manage network peripherals, but I guess it's a matter of design.

Cheers,
Dian
 
Sorry, thought that the link was one of those auto/ad links. I'm going to do some digging with the vendor manuals and see about support for SNMP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top