Decomment hosts
This commit is contained in:
parent
3b72e2fe2d
commit
dc2db3d6a3
4 changed files with 29 additions and 319 deletions
|
@ -6,10 +6,15 @@ 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"
|
||||
echo "[+] Handling host $host"
|
||||
|
||||
# sshpass can be used for non-interactive password authentication.
|
||||
# place your password in ldap-password.txt.
|
||||
sshpass -f ldap-password.txt ssh-copy-id "$host"
|
||||
SSHPASS=${passwd} sshpass -v -e ssh-copy-id -i ~/.ssh/id_rsa "$host"
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue