I often remotely connect via putty to client computers over ssh.
I would like to share my putty session so the client can see the commands I'm running from a web browser.
Is this possible to do?
Note I know it's possible to share a window using the Linux screen command.
Best Answer
One way you can do this is saving the terminal session into a file and then accessing that file with a browser. Since your question gives very little information about your setup, I will assume that i) you are connecting to *nix clients, ii) the client can serve a webpage.
The main tool here is a program called
script
:You can install on Debian based distros using
Then create a simple HTML file on the remote machine with the following contents and save it as
output.htm
(make sure it is accessible from the internet):The
<meta>
tag makes the page refresh every 2 seconds and the<pre>
tag ensures that new lines and spaces are displayed correctly.Now, once you log on to the remote machine run
script -af output.htm
. That will append (-a
) a transcript of your terminal session to the fileoutput.htm
. Your client can then accesshttp://remote.server.com/output.txt
and watch the commands as they appear.CAVEATS:
If you use colored output in your terminal, the ANSI escape sequences that make the colors will be visible in your html output.