I need to execute Linux commands on a remote server (actually, EC2 machines) from my Java code. I found two libraries, sshj and jsch. Both are extensively used, but neither is extensively documented.
This is an example of using private/public key, but oh, so hard! http://stackoverflow.com/questions/3686710/sshj-example-of-private-public-key-authentication
Any help or explanation anywhere?