combined windows keys to one

This commit is contained in:
2023-12-22 17:41:21 -06:00
parent 4c6264717f
commit 1f90003556
+4 -19
View File
@@ -37,18 +37,10 @@ fi
# authorized_keys akanealw
cp /home/akanealw/.ssh/authorized_keys /home/akanealw/.ssh/authorized_keys.bak
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "gamingpc-akanealw")
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "winpc-akanealw")
if [ $isInFile -eq 0 ]
then
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINRfrcCbyeG7O7P3/WNuPrOr131x/DHcJqjJVE/BBrAU gamingpc-akanealw" >> /home/akanealw/.ssh/authorized_keys
chown akanealw:akanealw /home/akanealw/.ssh/*
chmod 600 /home/akanealw/.ssh/*
fi
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "laptoppc-akanealw")
if [ $isInFile -eq 0 ]
then
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAj1SSffm3S3wJCSq3YjGzQ/Gw3Ta9YRzUmSvxv4/bVm laptoppc-akanealw" >> /home/akanealw/.ssh/authorized_keys
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBKYj+eRQsvdLvrJNoqugb9A7iQT+BEPb6LI9BseyhWR winpc-akanealw" >> /home/akanealw/.ssh/authorized_keys
chown akanealw:akanealw /home/akanealw/.ssh/*
chmod 600 /home/akanealw/.ssh/*
fi
@@ -64,17 +56,10 @@ fi
# authorized_keys root
cp /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bak
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "gamingpc-root")
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "winpc-root")
if [ $isInFile -eq 0 ]
then
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILMb59HWxAoetRy+Qd0IWrF79z6iwq/JcL2cJ8rRI4Io gamingpc-root" >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "laptoppc-root")
if [ $isInFile -eq 0 ]
then
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL3BxOpdWBLaZKL/EKIRIypK91hFvYE7Ak2fgDEiPmHE laptoppc-root" >> /root/.ssh/authorized_keys
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBI/kuy/SVCxShVBNtWtNREX9cpWrlsthV3z15ky+bPy winpc-root" >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi