I'm trying to run ssh command in Eclipse this way
ExpectJ exp = new ExpectJ();
Spawn s = exp.spawn("ssh root@192.168.1.2");
. . .
. . .
. . .
But i get this as the error-
Pseudo-terminal will not be allocated because stdin is not a terminal.
If i try doing it the following way,
Spawn s = exp.spawn("ssh -t -t root@192.168.1.2");
and execute,i get this error
tcgetattr: Invalid argument
also,the code executes only half and i get this message-
Killed by signal 15.
and finally i face a timeout exception
Any Suggestions? I'm not sure what those error messages mean.