Looking for a JAVA Telnet/SSH class library
July 31, 2006 2:09 AM   Subscribe

I'm looking for a JAVA package/class library that would allow me to connect, send and receive data via the telnet and SSH protocol. I would love for the package/library to handle the connecting, handshaking, authentication, etc. I would like the the protocol to be transparent to me, meaning that the way I send data and receive wouldn't change my code if it was SSH or telnet. Any version of the JAVA is fine. I'm trying to develop a different kind of telnet/ssh client and would rather not rewrite code if there is something already out there. I could even get started with just telnet. Thank you for your time and help. Have a great one.
posted by JohnGL to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
I actually implemented a telnet client in Java. FYI it was a huge pain in the ass. Telnet is actually a binary protocol designed to accommodate different TTY types. Anyway, a quick google search brought up this.
posted by delmoi at 2:39 AM on July 31, 2006


This may be of use to you:
http://linuxmafia.com/ssh/java.html
posted by gadha at 2:51 AM on July 31, 2006


I haven't actually used but I think jsch does what you want, at the the ssh part.
posted by rdr at 2:53 AM on July 31, 2006


Then there's Ganymed SSH-2 for Java, which also should work for the SSH part.
posted by rpn at 3:04 AM on July 31, 2006


gadhas link actually lists all these solutions, together with some additional ones.
posted by rpn at 3:06 AM on July 31, 2006


If you can't find just one that handles both, you should be able to make an adapter class setup fairly easily.
posted by flaterik at 3:15 AM on July 31, 2006


I actually wrote a small part of OpenSSH :) You want J2SH. It actually lets you set up sockets that are serviced, remotely, via SSH port forwards.
posted by effugas at 5:52 AM on July 31, 2006


Reminder: while you use telnet protocol to talk to telnetd servers and log in, you use it for other things as well, whereas you're *always* talking to an sshd server with ssh; this implies that ssh requires a usernamd (and usually a password, though that issue is even stickier now than it used to be) while telnet may not require either, and they're usually in-band anyway, instead of out-of-band as SSH commonly sends them; this could impact how drop-in-able your two sets of routines are...
posted by baylink at 10:10 AM on July 31, 2006


« Older Brain Age equivalent for Windows/Mac?   |   I come from gay pareee Newer »
This thread is closed to new comments.