I would like to connect to a remote machine, ideally over SSH, and then pull the commands from there.
To be precise, I would like make a remote machine connect to my local machine, where I would have an interactive console, send commands and see the output.
Functionally it would be similar to Windows Remote Assistant or what's the name.
I can imagine I would implement a HTTP server that would have a GUI, and on request, it would keep the connection forever and send any line that I type to the GUI; and receive everything the other side sends as its output. I would only have to take care of the HTTP headers. However, that's not too elegant.
Is there some such ready-made solution? Or perhaps using nc
or some tool that would connect the TTY with a listening port?