Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Logging/tracking changes made in ssh/Putty connection to a server

    • Article Type: General
    • Product: Aleph
    • Product Version: 18.01

    Description:
    Is there a way to automatically log or track every change that is made in a Putty connection to the server for a particular login?

    Resolution:
    Here's some information about that:

    In Unix, how do I log a session to a file?
    You can use the Unix command script to log your Unix session to a file. At the Unix prompt, enter:

    script filename

    Replace filename with the name you wish to give your log file. You will then see "script started, file is filename" on the screen, and you will be in a subshell (a second invocation of your login shell).

    From then on, everything that you see on your screen is also written to the file filename. If you do not specify a filename, the session will be logged to a file called typescript.

    To append the log to the named file rather than overwriting it, use:

    script -a filename

    To end the logging of your session, enter exit at your shell prompt. This command will cause the logged subshell to exit, and you will be returned to the shell from which you invoked the script command (usually your login shell).

    You can read the file using a pager command such as more or less, or open it with an editor such as Pico, Emacs, or vi. For example, to read the file using the more command, enter:

    more filename

    Replace filename with the name of your file.


    • Article last edited: 10/8/2013
    • Was this article helpful?