LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2008, 03:50 AM   #1
nano2
Member
 
Registered: May 2007
Posts: 100

Rep: Reputation: 15
Using Java ssh client class


Hi ,
I want to use the ssh client in java application , however I can 't find the class to include this .

I have found the telnet class import org.apache.commons.net.telnet.TelnetClient;

Can anyone tell where i can locate the ssh client class ?


Thanks in advance ,
 
Old 08-18-2008, 03:59 AM   #2
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
Try googling for "java ssh" and be amazed.
 
Old 08-18-2008, 08:30 AM   #3
nano2
Member
 
Registered: May 2007
Posts: 100

Original Poster
Rep: Reputation: 15
Yeah have done that but there is a cost involved when downloading them , I don't want to buy the application to do this .

I Have been also looking to see if there is an ssh client in the apache package and there seems to be none ...

Maybe you could suggest ...


Thanks
 
Old 08-18-2008, 12:40 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Apache Commons should have everything you need - you just need to put the pieces together yourself.

Please look at this tutorial: it starts with a Java HTTP client (using Apache Commons), then extends it to HTTPS:

http://www.onjava.com/pub/a/onjava/2...5/commons.html

'Hope that helps .. PSM
 
Old 08-18-2008, 05:02 PM   #5
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
There's no SSH support in commons net that's why you can find the class to import, it's as simple as that. If you need SSH support you need to download a SSH library. There are many free SSH libraries which can be easily found on google.
 
Old 08-18-2008, 07:36 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Surely your distro has libj2ssh-java?

Last edited by jay73; 08-18-2008 at 07:37 PM.
 
Old 08-19-2008, 03:45 AM   #7
nano2
Member
 
Registered: May 2007
Posts: 100

Original Poster
Rep: Reputation: 15
Hi Jay73,
I have checked my distro and I don't have libj2ssh-java. I am using java 1.5.

Where would it be located , can i add this to my distro ?

Thanks
 
Old 08-19-2008, 06:50 AM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
It's included in Ubuntu and Debian. I checked its documentation and it lists this link:
Homepage: http://sshtools.sourceforge.net
 
Old 08-25-2008, 02:08 PM   #9
haxpor
Member
 
Registered: Dec 2006
Distribution: Ubuntu 20.04
Posts: 87

Rep: Reputation: 15
Maybe for the hard way approach, you can read the format specification of the ssh.
Then you create your program by follow that format, but this is the difficult way but nonetheless it gives you a lot of information about networking.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java - one class for all? Java Design. trscookie Programming 4 02-07-2008 06:06 PM
Need help installing First Class Client on Puppy slickhare Linux - Newbie 4 11-20-2006 01:34 PM
IMPORTANT:: Linux First Class Client SpiderIRE Linux - Software 1 11-17-2006 05:48 AM
Running a Java executable class from another executable class LUB997 Programming 22 07-24-2005 04:57 AM
Compile Java - .class, .java, .jar ? woranl Programming 2 11-09-2004 10:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration