Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- IFS=$'\n'
- for line in $(cat /root/.ssh/authorized_keys); do
- host=$(echo "$line" | grep -Eo "@.*$" | tr -d @)
- if [ ! -e "/etc/pve/nodes/$host" ]; then
- continue
- fi
- echo "Containers on ${host}:"
- ssh "$host" "vzlist -a"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement