The best way to keep a log of specific activities that are being outputted to the screen during an ssh session though can be done multiple ways.
|PuTTY Logging Options|
Under the Session options in putty you can specify varying logging levels of output. The problem I have found with these options is that they are generally not formatted as they are displayed on the screen at the time of logging. What is beneficial though is that you can capture more detail than the secondary method I use.
PuTTY does have the option to append/overwrite log files for each session but there is no concept of log rotation unfortunately.
The second method and my favourite method for its simplicity is to "tee" the output of an ssh session to the file. That can be done as follows from any existing terminal window:
ssh firstname.lastname@example.org | tee logfileBe aware that using tee will overwrite any existing files of the same name and will not be as verbose as PuTTY in logging contents of open applications (such as the changes to a file when using vi)
This method is developed for logging and collaboration of terminal output
You can log the output of commands to a file using the "script" command and specify many different options for logging.
script -af /path/to/file
The options are as follows;
-a - append to log file instead of overwriting -f - flush the results of the file for easy collaboration with co-workers after each command is typed they can check the results using tail -f