import os
import stat
for root, _dirs, files in os.walk('/etc'):
for name in files:
path = os.path.join(root, name)
Protocol 2
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes
AllowUsers deploy ops
#!/usr/bin/env bash
set -euo pipefail
find / -perm -4000 -type f 2>/dev/null | sort
sudo -l
find /etc/systemd/system -type f -writable 2>/dev/null
#!/usr/bin/env bash
set -euo pipefail
OUT="/tmp/incident-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$OUT"
#!/bin/bash
set -euo pipefail
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
#!/bin/bash
# Linux system administration commands
# === Process Management ===
ps aux # All processes
ps aux | grep nginx # Find specific process
table inet filter {
chain input {
type filter hook input priority 0;
policy drop;
ct state established,related accept