I want to implement the expect "interact" command using java. In expect, it's possible to open an ssh session, authenticate and, then, use the "interact" command to give the control back to the user. Is that possible with java? I've tried with expectJ, expect4J and expectForJava but there's little documentation and almost no examples of how to do this. TIA.
Update: for "interact" command reference, please check this out: http://wiki.tcl.tk/3914
"Interact is an Expect command which gives control of the current process to the user, so that keystrokes are sent to the current process, and the stdout and stderr of the current process are returned."
interact
is pretty high up the secret-sauce scale. Good luck! (It uses a lot of the funkier details of Unix virtual terminals in order to hook the one that the user is on to the one that the spawned application is on. It's also really rarely implemented except in the original Expect.) – Ionopause