LED feedback for SSH activity - green/blue/red/amber based on login state
- JavaScript 100%
| src | ||
| tests | ||
| .gitignore | ||
| cli.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
SSH Mood Light
LED feedback for SSH activity - changes color based on login state.
Moods
| Color | State | Description |
|---|---|---|
| Green | Idle | No one connected |
| Blue | Connected | Someone logged in |
| Red | Failed | Login attempt failed |
| Amber | Active | Active session in progress |
Usage
# Monitor auth.log (requires root/sudo)
sudo ssh-mood-light /var/log/auth.log
# Mock demo (no hardware needed)
ssh-mood-light --mock
# With webhook
ssh-mood-light --webhook=http://localhost:8080/color /var/log/auth.log
Architecture
auth.log -> parser -> mood engine -> LED controller
-> webhook (optional)
Configuration
JSON config file via --config=:
{
"fail_cooldown_ms": 10000,
"initial_state": "green",
"webhook_url": "http://localhost:8080/color",
"log_file": "/var/log/auth.log",
"controller": "mock"
}
Install
npm install
npm test