diff --git a/alpine/alpine-essentials.sh b/alpine/alpine-essentials.sh index b2eabc5..f0e150a 100755 --- a/alpine/alpine-essentials.sh +++ b/alpine/alpine-essentials.sh @@ -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