How can I connect to a unix box remotly and startup/shutdown a server?
I am sort of new to this but even if someone could tell me how to connect to a unix 开发者_JAVA百科box remotely using Java I think I could get the rest.
If an ssh connection would be fine for you, have a look at JSch.
Check this out:
http://javassh.org/space/start
It's under GPL license.
There are a number of Java SSH clients you could use:
- http://javassh.org/
- http://www.jcraft.com/jsch/
- http://www.ganymed.ethz.ch/ssh2/
I assume you want to open a session on ssh to a UNIX machine. In that case, you may want to have a look at JSch
Why do you need to use Java? Most likely you can just ssh using gitbash, putty, a terminal. It depends on your environment.
However if you need to do this from within Java take a look at this.
精彩评论