I would like to execute
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=dev/null -i key.txt user@host 'cd some/directory; ./check status'
on Java and read the response it gives me. Can someone please tell me how I would go about doing this?
As you see from the command, the problem is that I need to execute only one command, and I am using a private key to get into the server without using any passwords or anything of the kind. Any help will be immensely appreciated, I am bashing my head against the wall trying to solve this.