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 tmux
installed.
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.
screen
. This is exactly whatscreen
(ortmux
) is made for. Why can't you use one of these? Please explain a little bit your setup and restrictions so that we can provide good answers. (stdout
can be captured also withnohup
, but not sure aboutstdin
).sceen
and there does not seem to betmux
installed at all.screen
is installed and how did you determine that it's too old?4.01.00devel (GNU) 2-May-06
and it does not like unicode-characters.