Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Classes SSH-SCP for Java

Reply
Thread Tools

Classes SSH-SCP for Java

 
 
Xavier
Guest
Posts: n/a
 
      10-27-2004
Hello,

I am searching for classes to use SCP (server use SSH2) in my Java
application.
Any idea ? Any link ?

Thanks

Xavier


 
Reply With Quote
 
 
 
 
Rogan Dawes
Guest
Posts: n/a
 
      10-27-2004
Xavier wrote:

> Hello,
>
> I am searching for classes to use SCP (server use SSH2) in my Java
> application.
> Any idea ? Any link ?
>
> Thanks
>
> Xavier
>
>

Google for "Java ssh2 scp"?

Go on, just try it! Hint: The 5th link pointing to linuxmafia is the one
you want. . . . .

Rogan
--
Rogan Dawes

*ALL* messages to http://www.velocityreviews.com/forums/(E-Mail Removed) will be dropped, and added
to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"
 
Reply With Quote
 
 
 
 
John C. Bollinger
Guest
Posts: n/a
 
      10-27-2004
Xavier wrote:

> I am searching for classes to use SCP (server use SSH2) in my Java
> application.
> Any idea ? Any link ?


Did you try Google?

http://www.google.com/search?hl=en&q...=Google+Search

I can't recommend any particular solution, but it looks like there are
quite a few available.


John Bollinger
(E-Mail Removed)
 
Reply With Quote
 
Alex Hunsley
Guest
Posts: n/a
 
      10-27-2004
Xavier wrote:
> Hello,
>
> I am searching for classes to use SCP (server use SSH2) in my Java
> application.
> Any idea ?


Learn how to use this really useful site called "Google".

> Any link ?


www.google.com

>
> Thanks
>
> Xavier
>
>

 
Reply With Quote
 
Bryan Castillo
Guest
Posts: n/a
 
      10-28-2004
Rogan Dawes <(E-Mail Removed)> wrote in message news:<cloj0c$2iu$(E-Mail Removed)>...
> Xavier wrote:
>
> > Hello,
> >
> > I am searching for classes to use SCP (server use SSH2) in my Java
> > application.
> > Any idea ? Any link ?
> >
> > Thanks
> >
> > Xavier
> >
> >

> Google for "Java ssh2 scp"?
>
> Go on, just try it! Hint: The 5th link pointing to linuxmafia is the one
> you want. . . . .
>


Can anyone out there comment on some of the ssh packages for java?
Have you tried any of them and were you happy with them? I tried
using jsch, it is one of the optional packages that ant 1.6+ uses for
its ssh tasks. I was trying to figure out how to execute commands via
ssh. The jsch packages seems like its built more for tunnelling X or
something..... It launches threads for input, error and output
streams and you have to wait for them to complete and there is no
event notification (like a listener) to tell you when IO is done.

I looked at the ant 1.6.2 code and it used a loop with a half-second
sleep.

[Snippet from ant.taskdefs.optional.ssh.SSHExec.java]

// execute the command
Session session = openSession();
session.setTimeout((int) maxwait);
final ChannelExec channel = (ChannelExec)
session.openChannel("exec");
channel.setCommand(command);
channel.setOutputStream(tee);
channel.setExtOutputStream(tee);
channel.connect();

// wait for it to finish
thread =
new Thread() {
public void run() {
while (!channel.isEOF()) {
if (thread == null) {
return;
}
try {
sleep(500);
} catch (Exception e) {
// ignored
}
}
}
};

thread.start();
thread.join(maxwait);

[end code snippet]

I thought it was a little messy and clumsy to have to code a sleep in
there to wait for IO completion of the ssh exec task.


I also looked at SSHTools and the API seemed very complicated.
Perhaps I'll take a look at it again, but I really didn't want to
write code to check keystores myself.



> Rogan

 
Reply With Quote
 
Xavier
Guest
Posts: n/a
 
      10-29-2004
Hi,

> Learn how to use this really useful site called "Google".


Oh, yes ! How if I had not thought of it !

> www.google.com


Wouldn't this be ... "google" ?

......

If I post the question, it's that I have already searched on the web !!

Xavier


 
Reply With Quote
 
Michael Borgwardt
Guest
Posts: n/a
 
      10-29-2004
Xavier wrote:
> If I post the question, it's that I have already searched on the web !!


If we answer "Try Google" it's that we cannot imagine someone having alread
searched on the web and not having found something. Which means that there
are two possible explanations:

- You are very bad at using search engines, in which case "Learn to use Google"
is the best solution to the problem.

- The SSH implementations that can so easily be found are not useable to you
for some reason - in which case you should have TOLD us that reason so that
we can help you find one that better matches your criteria.
 
Reply With Quote
 
Alex Hunsley
Guest
Posts: n/a
 
      11-04-2004
Xavier wrote:
> Hi,
>
>
>>Learn how to use this really useful site called "Google".

>
>
> Oh, yes ! How if I had not thought of it !
>
>
>>www.google.com

>
>
> Wouldn't this be ... "google" ?


Yes, it is google, that's what I said wasn't it?

>
> .....
>
> If I post the question, it's that I have already searched on the web !!
>
> Xavier


Then you really do need to learn how to use a search engine. Google
returned lots of googd hits when I searched for a java ssh implementation.

alex
 
Reply With Quote
 
Xavier
Guest
Posts: n/a
 
      11-05-2004
> I am searching for classes to use SCP (server use SSH2) in my Java
> application.
> Any idea ? Any link ?


OK, precisions : I need SSH2 implementation .... All I have found on the WEB
are implenting SSH1.

Xavier


 
Reply With Quote
 
Michael Borgwardt
Guest
Posts: n/a
 
      11-05-2004
Xavier wrote:

>>I am searching for classes to use SCP (server use SSH2) in my Java
>>application.
>>Any idea ? Any link ?

>
>
> OK, precisions : I need SSH2 implementation .... All I have found on the WEB
> are implenting SSH1.


http://www.google.com/search?q=java+ssh2
Seems to give one as the first result, namely
http://www.jcraft.com/jsch/
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When a Java program starts up, several system threads are also started ... Is this why all Java classes have extra synchronization overhead ... Casey Hawthorne Java 1 10-27-2006 09:39 AM
Tips for backporting Java 1.6 classes into Java 1.5? Oliver Wong Java 5 09-22-2005 03:19 PM
Classes within classes David ASP .Net 2 07-22-2005 07:13 PM
Substituting Java API classes for enhanced functionality (e.g. java.io.File) Christian Schlichtherle Java 8 07-04-2005 11:20 PM
inner classes in python as inner classes in Java Carlo v. Dango Python 14 10-19-2003 08:49 AM



Advertisments