Problem statement: consider the present scenario, i am running some commands/code on host-1, and i need to open a tool on host-2 where i may perform some operations on data obtained on host-1.
what i was doing till now was opening two different shells, one for host 1 and another for host 2, then i after running codes on host-1 would switch manually to the other shell prompt, where i would deal with the commands on tool. and would finally move back to the original shell.
An example would be executing a basic linux command on host-2 and capturing it response. Ex: do a ls -l on host-2 while we are on host-1 and get the results in some variable that could be kept for further processing.
Is there a way to automate this thing?? I mean a way in which i can logon to host-2 on the fly and execute those tool commands and get back to host-1 ?
I prefer writing a perl script for this.