I am using perl module "Expect" to achieve automation of interactive sessions. The script intends to spawn a ssh terminal on localhost(say).So the problem is can use two spawn commands (for spawning two ssh terminals)from the same script. In that case how the two spawned process share the ssh terminal. I found that both the spawned commands actually share the ssh terminal. So the UI on terminal is actually messy. Is the above assertion true?
Question 1) If true, is there any better way of controlling the spawned process in accessing the ssh terminal.
Scenario: 1) say perl script "demo.pl" has two spawn commands which does spawn a ssh terminal locally. 2) Spawned process are actually sharing the ssh terminal from which perl script is executed.
Question 2) So is there any way to launch a totally new ssh terminal, instead of using existing one.