I have a shell script which executes a various of commands like killing processes, copying files via scp, performing remote commands via ssh and etc...

The problem is that this script is hard to maintain and hard to unit test.
Moreover, I want in the future to change it so it would work with xml config file, and I think that it cant be easily done with shell scripts.
So, I want to transform it to a java application, but just running many commands with ProcessBuilder doesn't feel right.

On the other hand, searching for java solutions for each "problem" that today is easily solved in shell commands (like java ssh client, java API for linux processes and etc..), also doesn't feel right.

EDIT:
I know for sure that my program will run in a linux environment, so cross platform is a non-issue here.

Any suggestion?