Saving terminal sessions to log files

Record a terminal's output to a plain text file, for one session or every session, and choose where the logs go.

Duo22 can save what a terminal shows to a plain text file. This works for SSH, Telnet, serial and container shell sessions alike.

Logging one session

  1. In the terminal’s toolbar, click the Log this session to a file button. You can also right-click in the terminal and choose Log this session to a file.
  2. The button turns red (Logging this session). Duo22 logs everything from that moment on.
  3. To see the file, click the red button. The menu shows the file’s full path; choose Show log file to open its folder.
  4. To finish, click the red button and choose Stop logging, or pick Stop logging from the right-click menu.

If the session reconnects, the log carries on in the same file.

Logging every session

Turn on Settings → Terminal → Log every terminal session. Every terminal you open then starts a log automatically. You can still stop the log for a single session with its log button.

Where logs are saved

By default, logs go to a Duo22 Logs folder in your Documents folder. Each host gets its own folder inside it, named after the host.

To use a different folder, type it in Log folder in Settings → Terminal, or click Choose…. The folder must be a full path. You can start it with ~/ to mean your home folder.

Each file is named after the date and time the log started, for example 2026-11-10 14.03.22.log. If that name is taken, a number is added. The file starts with a line naming the host and start time, and ends with [session log ended …] when the log closes.

What’s in a log

Logs contain the text as it read on screen:

  • Colours and other formatting codes are removed.
  • Backspaces, line edits and progress bars show only their final text.
  • Full-screen programs such as editors or top are left out.

Security

Log files are ordinary files on this computer, outside the encrypted vault. They hold whatever the session showed, including any secrets that appeared on screen. On macOS and Linux, the folders Duo22 creates for logs and the log files themselves can only be read by your user account. Delete logs you no longer need, and choose the log folder carefully.

Locking the vault or signing out closes any open logs.

If logging stops

If Duo22 can’t create the file, you’ll see Couldn’t start the session log with the reason, such as a folder it can’t create or a path that isn’t a full path. If writing fails partway, for example because the disk is full, you’ll see Session log stopped. What was written up to that point stays in the file.

For other problems, see Troubleshooting terminals, SFTP and port forwarding.

Still stuck? Check the FAQ, or browse thehelp centre.