Session logging in PuTTY preserves a local transcript of interactive terminal work for troubleshooting, compliance audits, and sharing reproducible command output.

PuTTY writes log data on the local Windows system using options in the SessionLogging panel. The selected logging mode controls whether a clean, readable text transcript is stored, whether terminal control characters are also captured, or whether low-level SSH protocol packets are recorded for debugging.

Log files often contain sensitive material such as commands, hostnames, and application output, and SSH packet logs can expose credentials when password authentication is used. Store logs in a controlled directory, use unique filenames to avoid overwriting, and prefer Printable output unless terminal control troubleshooting requires All session output.

Steps to configure session logging in PuTTY:

  1. Launch PuTTY.
  2. Select a profile under Saved Sessions and click Load.
  3. Select SessionLogging in the left pane.
  4. Choose a logging mode under Session logging.

    None disables log file creation, Printable output is the typical choice for readable transcripts, and All session output includes terminal control codes for display/debug analysis.

    SSH packets and SSH packets and raw data are intended for protocol-level debugging and can record sensitive fields; treat packet logs as secrets and avoid sharing unredacted files.

  5. Enter a destination file path in Log file name.
    C:\puttylogs\putty-&H-&Y&M&D-&T.log

    PuTTY replaces &H (host), &P (port), &Y (year), &M (month), &D (day), and &T (time) to generate unique filenames per connection.

  6. Select a policy under What to do if the log file already exists.

    Always overwrite it replaces the previous log, Always append to the end of it keeps a continuous file, and Ask the user every time prompts on each connection.

  7. Enable Flush log file frequently when near-real-time log updates are required.

    Frequent flushing reduces the chance of losing recent output on unexpected termination, at the cost of additional disk writes.

  8. Enable Omit known password fields or Omit session data when SSH packets logging is selected.

    Omission options only affect SSH packet logging modes and help reduce sensitive material in logs intended for external review.

  9. Return to Session and click Save to store the logging settings in the profile.
  10. Click Open to start the session.
  11. Open the log file in Notepad to confirm new session output is being written.

    If no file is created, re-check that the logging mode is not None and that the directory in the log file path exists and is writable.