I am trying to understand how to access stdin an stdout for a process.
I have a remote machine accessible only by SSH and I want to run a terminal based program in the background. That is, I fire up the the program through ssh-terminal in detached mode so that the ssh-connection can be closed.
And this program has its own terminal-based interface and it listens user input from stdin and outputs to stdout.
My question is that how can I pipe the stdin/stdout so that it can be accessed by some other terminal in the remote machine? That is I open a new ssh-terminal and the simply access the detached program.
Or how can I pipe in/out so that it can be tunneled through ssh to my local machine and use it there in the same manner?
I cannot use
screen in the remote machine to achieve the effect because it is too old, and I cannot upgrade it. Also there is no
However both of these programs are accessible in the local machine, so if any kind of tunneling is possible, then it might solve the problem.