more testing

This commit is contained in:
2024-03-13 11:35:36 -05:00
parent d131d99fb2
commit 59da59cde3

View File

@@ -38,14 +38,16 @@ fi
rm /etc/motd > /dev/null 2>&1
# enable and start sshd
rc-update add sshd
rc-service sshd start
if [[ ! -d /etc/ssh ]]; then
rc-update add sshd
rc-service sshd start
fi
# add ssh keys for akanealw
if [[ -d /home/akanealw ]]; then
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")
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "winpc-akanealw") > /dev/null 2>&1
if [ $isInFile -eq 0 ]; then
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBKYj+eRQsvdLvrJNoqugb9A7iQT+BEPb6LI9BseyhWR winpc-akanealw" >> /home/akanealw/.ssh/authorized_keys
fi