Overview
Deploy the SSH Health Monitoring system that allows monitoring a remote Mac's health via a Vercel-hosted dashboard with WebAuthn/Passkey authentication (Touch ID/Face ID).
Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Remote Mac │ push │ Vercel KV │ read │ Vercel App │
│ (SSH target) │ ──────► │ (Redis) │ ◄────── │ (Dashboard) │
│ │ every │ │ │ │
│ health-agent │ 30s │ health data │ │ + WebAuthn │
└─────────────────┘ └─────────────────┘ └─────────────────┘
Current Status
The code is complete and builds successfully. Located at:
ssh-health-monitor/dashboard/ - Next.js 16 app
ssh-health-monitor/agent/ - Bash scripts for remote Mac
Deployment Tasks
1. Deploy Dashboard to Vercel
2. Set Up Vercel KV Store
3. Configure Environment Variables
Set these in Vercel project settings:
| Variable |
Description |
Generate With |
HEALTH_API_KEY |
Agent authentication |
openssl rand -base64 32 |
JWT_SECRET |
Session signing |
openssl rand -base64 64 |
WEBAUTHN_RP_ID |
Domain name |
devanvelji.com |
WEBAUTHN_RP_NAME |
Display name |
SSH Health Monitor |
WEBAUTHN_ORIGIN |
Full URL |
https://ssh-health.devanvelji.com |
ALLOWED_USERS |
Authorized users |
devan |
4. Install Agent on Remote Mac
5. Verify Everything Works
Features
Dashboard
- Real-time health metrics (CPU, Memory, Disk, Network)
- SSH status with diagnostics (sshd running, port 22, firewall)
- Current logged-in users
- Recent authentication failures
- Auto-refresh every 30 seconds
- Red/yellow/green status indicators
Security
- WebAuthn passkeys only (no password fallback)
- API key for agent authentication (stored in macOS Keychain)
- JWT sessions with HTTP-only cookies
- 24-hour data retention
Health Metrics Collected
| Metric |
Source |
| CPU usage & load average |
top, sysctl |
| Memory (total/used/free) |
vm_stat, sysctl |
| Disk usage |
df |
| Network status & IPs |
ping, curl, ipconfig |
| SSH status |
pgrep sshd, lsof, firewall check |
| System uptime |
sysctl kern.boottime |
| Current users |
who |
| Auth failures |
log show |
Troubleshooting Reference
Dashboard shows "No health data":
# On remote Mac
launchctl list | grep health
tail -f ~/health-agent/health-agent.log
~/health-agent/health-check.sh # Test manually
WebAuthn fails:
- Ensure using HTTPS
- Verify
WEBAUTHN_ORIGIN matches URL exactly (including protocol)
SSH shows unavailable:
sudo systemsetup -getremotelogin
sudo systemsetup -setremotelogin on
Related Files
ssh-health-monitor/README.md - Full documentation
ssh-health-monitor/dashboard/.env.example - Environment template
Overview
Deploy the SSH Health Monitoring system that allows monitoring a remote Mac's health via a Vercel-hosted dashboard with WebAuthn/Passkey authentication (Touch ID/Face ID).
Architecture
Current Status
The code is complete and builds successfully. Located at:
ssh-health-monitor/dashboard/- Next.js 16 appssh-health-monitor/agent/- Bash scripts for remote MacDeployment Tasks
1. Deploy Dashboard to Vercel
vercelfromdashboard/directoryssh-health.devanvelji.com)2. Set Up Vercel KV Store
3. Configure Environment Variables
Set these in Vercel project settings:
HEALTH_API_KEYopenssl rand -base64 32JWT_SECRETopenssl rand -base64 64WEBAUTHN_RP_IDdevanvelji.comWEBAUTHN_RP_NAMESSH Health MonitorWEBAUTHN_ORIGINhttps://ssh-health.devanvelji.comALLOWED_USERSdevan4. Install Agent on Remote Mac
scp -r agent/ user@remote:~/health-agent-setup/~/health-agent-setup/install.shlaunchctl list | grep health5. Verify Everything Works
Features
Dashboard
Security
Health Metrics Collected
top,sysctlvm_stat,sysctldfping,curl,ipconfigpgrep sshd,lsof, firewall checksysctl kern.boottimewholog showTroubleshooting Reference
Dashboard shows "No health data":
WebAuthn fails:
WEBAUTHN_ORIGINmatches URL exactly (including protocol)SSH shows unavailable:
Related Files
ssh-health-monitor/README.md- Full documentationssh-health-monitor/dashboard/.env.example- Environment template