I want to do a remote shell to a Linux system and run various commands e.g. to ps and grep for processes and kill them.
I assume I can do something like: rsh that linux scripts do right?Is this the best option for me?
-
1JSCHthar45– thar452013-01-30 10:16:21 +00:00Commented Jan 30, 2013 at 10:16
Add a comment
|
2 Answers
rsh is unencrypted so isn't widely used anymore and is probably switched off on the remote systems you want to connect to.
It would be better to use SSH. JSch is a open source pure Java library that will make SSH connections and run commands for you.