I am looking for a simple way to execute the ssh command in my java program. Basically I gather user input and based on their choices on hosts I want to execute the ssh command and let the linux shell command take over. I have the feeling that a scripting language would be better suited but this is urgent and I have no experience in scripting. I have tried something like the following based on info I gathered on the site:
Runtime.getRuntime().exec("ssh myusername@ipaddress");
However it doesn't seem to work Thanks in advance