I have got one requirement where i have to access a unix server and on that server i have to run a shell script with some parameter from my java application. Please suggest some solution with example.
i have tried something but it is not working.
SshWrapper ssh = new SshWrapper();
try {
ssh.connect("10.206.19.80", 22);
ssh.login("*****","*****");
ssh.setPrompt("c898vqz:~");
ssh.waitfor("#");
System.out.println("PWD**********"+ssh.send("pwd"));
ssh.disconnect();
System.out.println(ssh.getClass());
} catch (java.io.IOException e) {
e.printStackTrace();
}
getting null from ssh.send("pwd")