I'm trying to run ssh command in Eclipse this way
ExpectJ exp = new ExpectJ();
Spawn s = exp.spawn("ssh [email protected]");
. . .
. . .
. . .
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 [email protected]");
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.
I can use the in-built method!! Never realized that even existed.