I have two machines. I SSH'd into one. I want whatever I type on one to display on the screen of the other. I know you can do this with the GNU screen command. How?
You do this using the multiuser function of screen.
Assuming you use the same user name to ssh in and connect ...
1) Start a ssh session
2) start a screen session, -S names the session
3) Enable multiuser.
4) Now on the server , you can connect with
I wrote a detailed description of how to do this on my blog
Some of the information in that blog is a bit dated, but, it covers additional issues of security and more then one user. should get you started.
In your first session, start screen:
Then, on that same machine (either locally or by ssh) connect to the existing screen. To do this you do
Where "session name" is the name of the screen you started above. To find this you can list all running screens like so:
And then you could copy the name of the screen you'd like to attach to.
Alternatively, if you only have one screen session running, you can just type
You might also like to look into a program called 'byobu' which is like a fancy front-end to screen. You can keep multiple screens open, kind of like tabs, and it has easier to remember shortcuts for attaching, detaching, switching between screens, etc.
The default setting for byobu is to attach to a session which is already running, if there is one, which makes what you want to do nice and easy. You would just type