Hi,
I need to write small application in Java which will connect to
computer with Linux OS and execute "reboot" command there (the
direction is to automate this process and do it on lot of pc's "at
once" by one *kick*). All using SSH. I tried sshtools (get tons of
errors, especially becouse no logfactory), now I'm focused on jsch but
have problems too. Can you (group) please tell me if I'm going right
direction, or perhaps my task could be done way easier? I'll be
thankfull for any ideas and tips.
Thanks in advice,
Mateusz Zajakala
Christian - 21 Aug 2007 15:18 GMT
mateusz.zajakala@gmail.com schrieb:
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks in advice,
> Mateusz Zajakala
I have used jsch quite sucessful lately.. it has proven to be very
useful for me.
It may not be very well documented but the examples explain nearly
everything s.o. needs to know to use it.
So yes I think you are on the right path.
mateusz.zajakala@gmail.com - 22 Aug 2007 08:40 GMT
> >now I'm focused on jsch but have problems too.
> I have used jsch quite sucessful lately.. it has proven to be very
> useful for me.
Looks like it works for me now too. It worked yesterday just after I
posted that message on forum (force majeure?), but I didn't have time
to check it more carefully - will do it today.
> So yes I think you are on the right path.
Thanks for confirmation. I like to know if I'm on a good way to the
goal. I'll focus on Jsch more carefully now.
Thanks again,
Mateusz Zajakala
Alexey - 21 Aug 2007 20:16 GMT
On Aug 21, 9:29 am, mateusz.zajak...@gmail.com wrote:
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks in advice,
> Mateusz Zajakala
I've done something similar using Ant's (http://ant.apache.org/) ssh
toools. It's an optional command, so you'll probably need to hunt
down a few external jars and take a bit of time to set everything up.
But all in all, I feel like it was faster than coding it myself and of
course it's all open source, so you can at least use it for reference.
mateusz.zajakala@gmail.com - 22 Aug 2007 08:43 GMT
> I've done something similar using Ant's ssh toools.
Thanks for idea. I'll look on it too, as later I'll have to extend my
application. If Jsch won't fit to solve my problem anymore, I'll have
an alternative.
Thank you,
Mateusz Zajakala
Roedy Green - 22 Aug 2007 09:37 GMT
>I tried sshtools
for some alternatives see http://mindprod.com/jgloss/ssh.html

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
jscape@gmail.com - 23 Aug 2007 00:14 GMT
You might look at SSH Factory. It has a SshSession class which is
ideal for this sort of thing (automating SSH sessions).
http://www.jscape.com/sshfactory/
mateusz.zajak...@gmail.com wrote:
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks in advice,
> Mateusz Zajakala
mateusz.zajakala@gmail.com - 23 Aug 2007 09:03 GMT
Looks like I solved my problem with Jsch. Precisely, with Jsch's
equivalent for C# - SharpSSH (as my application's going to work under
Windows Server, so I decided to use C#). Just for practise I'll
rewrite it to Java now, but that will be just formality. Generally I
looked through all suggestions you gave me but first choosen was just
sufficient. For that kind of problem like mine, using Jsch (SharpSSH)
was simple and good solution.
Thank you for support and ideas.
Mateusz Zajakala