Re: SSH application in Java
- From: Steven Mocking <ufo@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Aug 2007 10:24:07 +0200
mateusz.zajakala@xxxxxxxxx wrote:
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.
If it doesn't have to be java, why not simply setup a public/private key
pair, add 'username ALL = NOPASSWD: /sbin/reboot' to /etc/sudoers, so
you can use
ssh username@host sudo reboot
from the windows machine?
.
- Follow-Ups:
- Re: SSH application in Java
- From: mateusz . zajakala
- Re: SSH application in Java
- References:
- SSH application in Java
- From: mateusz . zajakala
- SSH application in Java
- Prev by Date: Re: SSH application in Java
- Next by Date: Re: SSH application in Java
- Previous by thread: Re: SSH application in Java
- Next by thread: Re: SSH application in Java
- Index(es):
Relevant Pages
|
|