Commit 8dbd25a6 authored by Valentino Lauciani's avatar Valentino Lauciani
Browse files

Set 'public_keys' array used to set 'authorized_keys' on remote host

parent 9a52dad9
......@@ -14,7 +14,9 @@ GITBASEDIRCURREPO=${GITBASEDIR}/group__${gitGroupName}/${gitRepoName}
SSHBASEDIR=/root/.ssh
TMPFILEKEY=/tmp/tmp_key
PUBKEY_VALENTINO="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsMicXiH6F7zjhRrjLLyycFBUDHuMi4/wLuZtMteVt+lvC6/s8VtxMB+DDSUrctYV3Sp3Kn9r4tVGhaj6xsTcj45OpLJvSHd1rd+1ke8ehH7TrKWuvrIVkWCz78/1q+Ogx9Wc/c5eq9s5zRvSKFinLx1lxSPjytInlOUVYhp2H7Ofbz0YGItgCm67Cy38C8slmeHEP9EXFMEj4QKqv67leRdTy+POrYMWRqOtELGSIH7P11ImEcyvzldpInP6DOkEBzh7Zyr7059DOi4SuAVz9dSX6YFAZb0gllBU0qxey6z8HCsuZ68s7ahbsKSV9G4xEMAQFIuZtnfVjrK+TYzovw== valentino@albus.int.ingv.it"
# Public key's array to set into 'authorized_key' file
PUBKEYS_TO_COPY[0]="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsMicXiH6F7zjhRrjLLyycFBUDHuMi4/wLuZtMteVt+lvC6/s8VtxMB+DDSUrctYV3Sp3Kn9r4tVGhaj6xsTcj45OpLJvSHd1rd+1ke8ehH7TrKWuvrIVkWCz78/1q+Ogx9Wc/c5eq9s5zRvSKFinLx1lxSPjytInlOUVYhp2H7Ofbz0YGItgCm67Cy38C8slmeHEP9EXFMEj4QKqv67leRdTy+POrYMWRqOtELGSIH7P11ImEcyvzldpInP6DOkEBzh7Zyr7059DOi4SuAVz9dSX6YFAZb0gllBU0qxey6z8HCsuZ68s7ahbsKSV9G4xEMAQFIuZtnfVjrK+TYzovw== valentino@albus.int.ingv.it"
PUBKEYS_TO_COPY[1]="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTPs3bE3LM0/YQADF6FO1/llv1/LjWI/P+qdtBOdpN6q0QJvxlYpx34uNgN1WD0x1Bb/rwU/aEXXMauhD+UuFEcs/IBi0/SrRYp8PhimFaZaFyUu/+biZ19zTlcSI3Rii9FOZfoWdet6JsDwquOz3BI+x28K8H2fHUWofBOS/eCfwxjQ80ncl/I0uUuXngnIyW6VACg88Peov6vau6BoJwumaBdB6G8PWizcm0vnTIXe+bf1FpMvAqT6jsLaqB6P0w5AAydLKoGSTjQDX1aiOKnMzMUXnFErwJfwzi553B6p4Do8EI82PZ7P2SSyN1BEH6wZZCF3KDADRr1ziER+EB valentino@pleo.int.ingv.it"
setup_sshkey()
{
......@@ -57,11 +59,14 @@ echo_date() {
configure_public_keys()
{
# root user
echo ${PUBKEY_VALENTINO} >> ~/.ssh/authorized_keys
for PUBKEY_TO_COPY in ${PUBKEYS_TO_COPY[*]}
do
# root user
echo ${PUBKEY_TO_COPY} >> ~/.ssh/authorized_keys
# vmadmin user
echo ${PUBKEY_VALENTINO} >> /home/vmadmin/.ssh/authorized_keys
# vmadmin user
echo ${PUBKEY_TO_COPY} >> /home/vmadmin/.ssh/authorized_keys
done
}
configure_apt()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment