DevOps / Scripts
bash
Intermediate
SSH Key Distributor
Push your public key to multiple remote servers in one loop.
bash
#!/bin/bash
SERVERS=(user@192.168.1.10 user@192.168.1.11 user@192.168.1.12)
for host in "${SERVERS[@]}"; do
ssh-copy-id -i ~/.ssh/id_ed25519.pub "$host" && echo OK: $host
done
Prerequisites
- ssh-copy-id
- SSH key pair
Pro Tips
- → Generate key with ssh-keygen -t ed25519.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- bash
- Level
- Intermediate
- Read time
- 2 min
- Published
- Apr 2024
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
Postgres S3 Backup
Dump a Postgres database, gzip it, push to S3 with AES256 encryption.
bash
·
Intermediate
Disk Usage Alert
Send an alert when any mounted filesystem exceeds a usage threshold.
bash
·
Beginner
Docker Image Cleanup Script
Remove dangling images, stopped containers and unused volumes in one pass.
bash
·
Intermediate