Remove copy-keys.sh

This commit is contained in:
jeltz 2022-02-26 19:12:30 +01:00
parent 859a84f69c
commit 0b28ae5c29
Signed by: jeltz
GPG key ID: 800882B66C0C3326

View file

@ -1,20 +0,0 @@
#!/bin/bash
set -e
# Grab valid unique hostnames from the Ansible inventory.
HOSTS=$(grep -ve '^[#\[]' hosts \
| grep -F adm.auro.re \
| sort -u)
# Ask password
read -s -p "Hello adventurer, what is your LDAP password? " passwd
echo
for host in $HOSTS; do
echo "[+] Handling host $host"
# sshpass can be used for non-interactive password authentication.
# place your password in ldap-password.txt.
SSHPASS=${passwd} sshpass -v -e ssh-copy-id "$host"
done