> ## Documentation Index
> Fetch the complete documentation index at: https://sen-f208ff9e.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit log

> A local, secret-safe record of connections and commands run through YourSSH, with filters, export and retention.

YourSSH keeps a local audit trail of what ran where: every connect and disconnect, and every command sent through an app feature such as a bulk run, DevOps tool, plugin or the input bar. Open it from **Audit Log** in the sidebar.

![The Audit log with exec rows from a bulk run and two connect rows](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/11-audit-log/01-rows.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=4f07e135559b5c9567b622cfe0188cb3)

The Audit log shows the newest events first.

> [!NOTE]
>
> The log records commands sent through app features. Keystrokes you type directly into a terminal aren't captured. For a full replay of a terminal, use [session recording](https://sen-f208ff9e.mintlify.site/user-guide/recording.md).

## What gets recorded

| Type | When |
| - | - |
| `connect` | A session connects, or finally fails (with the error and number of attempts). |
| `disconnect` | You close a live tab, or a session drops, including drops that reconnect automatically. |
| `exec` | A command runs over SSH exec, with its source and exit code. |
| `input` | A command goes in through the terminal input bar, broadcast input or a plugin. |

Each row shows the time, a colored type chip, `user@host`, the command, its **source** and, for commands, the exit code. The source says which feature produced the event, for example `bulk` for [bulk actions](https://sen-f208ff9e.mintlify.site/user-guide/bulk-actions.md), `devops` for the [DevOps Hub](https://sen-f208ff9e.mintlify.site/user-guide/devops.md), `input-bar` for the input bar, `plugin:<id>` for a plugin, `cli` or `url` for connections started from the [command line](https://sen-f208ff9e.mintlify.site/user-guide/cli.md) or a `yourssh://` link, and `rdp` or `vnc` for remote desktop sessions.

YourSSH leaves out its own background probes, such as the network stats overlay and OS detection, so the log stays readable.

## Secret redaction

YourSSH scrubs commands before it writes them to disk. It masks:

* `password=`, `token=`, `secret=` and `api_key=` values, including quoted multi-word values and prefixed forms like `PGPASSWORD=`
* `Authorization: Bearer` tokens
* `sshpass -p`
* the attached `-p<password>` form of `mysql` and `mariadb`
* `redis-cli -a`
* passwords inside URLs

Error messages stored with failed events go through the same redaction.

> [!WARNING]
>
> Redaction is best-effort pattern matching. Avoid putting secrets on command lines where you can.

## Filter and search

* Pick an event type from the type menu, which starts at **All types**.
* Pick a time range with the **Today**, **7d**, **30d** and **All** chips.
* Type in **Search command or host…** to match the command or host name.
* Click **Load more** at the bottom to page through a long history.

![The event type filter menu](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/11-audit-log/02-type-menu.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=a57bc1028a8cc4b87a1b100150a9c12d)

The event type menu lists All types, connect, disconnect, exec and input.

![The audit log filtered by a search term](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/11-audit-log/04-search.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=03c91b849a475d11f7e4250245f4b89a)

Searching for hostname narrows the list.

## Export

Click **CSV** or **JSON** at the top to export what the current filter shows. A save dialog asks where to put the file, and a toast confirms the export.

![The audit log after exporting to CSV](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/11-audit-log/05-export-csv.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=43d9cb0d809fd6892e2a8280831c5e8a)

After you export, a toast confirms where the file went.

## Retention and clearing

Open **Settings → Audit** to choose how long to keep events: `30 days`, `90 days` (the default), `365 days` or **Keep forever**. YourSSH deletes older events at launch.

Click **Clear** on the Audit log screen, or in **Settings → Audit**, to delete every event. YourSSH asks **Clear audit log?** and says all recorded events will be deleted.

![The Clear audit log confirmation dialog](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/11-audit-log/06-clear-confirm.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=3cc4c9f6915824b08af9512145aabd5e)

Clearing the audit log asks for confirmation.

## Where it is stored

The log is a local SQLite database named `audit.db` in the app's support folder. Only your user can read it, and it never syncs anywhere.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.