Regularly Export SSH Replays
Initial Setup
Create an Admin Token
chown sdm:sdm /etc/sdm-admin.tokenExport to a JSON File
#!/bin/bash
export SDM_ADMIN_TOKEN=<insert admin token here>
START=$(date -d "5 minutes ago" '+%Y-%m-%dT%H:%M:00') # start of audit slice, defaulting to 5 minutes ago
FN=$(date -d "yesterday 00:00" '+%Y%m%d%H%M') # timestamp string to append to output filename
END=$(date '+%Y-%m-%d%TH:%M:00') # end of audit slice, defaulting to now, at the top of the minute
TARGET=/var/log/sdm # location where JSON files will be written
/opt/strongdm/bin/sdm audit ssh --from "$START" --to "$END" -j > "$TARGET/ssh.$FN.json"Add a crontab entry
Export to Cloud Storage
SSH session extraction prior to export
SSH session extraction after export
Last updated
Was this helpful?

