I need execute bash commands on a separate Linux machine using java on Windows.
I need run executable file from specified directory, like
cd /home/bin
How can I do this?
I need execute bash commands on a separate Linux machine using java on Windows.
I need run executable file from specified directory, like
cd /home/bin
How can I do this?
After long hours, I finally found useful information. please follow link "How do I run SSH commands on remote system using Java?"
Also use jar from "http://www.ganymed.ethz.ch/ssh2/" the link. It is the jar required for any person to execute ssh commands from java code in windows environment. There are other ways too. And most jars I didn't find them useful, especially when you want to automate user authentication to access linux environment.
Note, passing directly the password (ssh password) is not appropriate way of doing things.And many experts suggested in few other threads.But this simple solution works for someone who is not concerned about security.