testing changes

This commit is contained in:
2024-03-13 11:32:36 -05:00
parent 439689b7d1
commit d131d99fb2

View File

@@ -43,19 +43,17 @@ rc-service sshd start
# add ssh keys for akanealw
if [[ -d /home/akanealw ]]; then
mkdir /home/akanealw/.ssh
mkdir /home/akanealw/.ssh > /dev/null 2>&1
cp /home/akanealw/.ssh/authorized_keys /home/akanealw/.ssh/authorized_keys.bak > /dev/null 2>&1
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "winpc-akanealw")
if [ $isInFile -eq 0 ]; then
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
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "server-akanealw")
if [ $isInFile -eq 0 ]; then
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAiw0sQxxTg/zBm/Hz4LLjtiuGfefF2vogGkYcWox4S server-akanealw" >> /home/akanealw/.ssh/authorized_keys
chown akanealw:akanealw /home/akanealw/.ssh/*
chmod 600 /home/akanealw/.ssh/*
fi
chown akanealw:akanealw /home/akanealw/.ssh/*
chmod 600 /home/akanealw/.ssh/*
fi