added check for config file

This commit is contained in:
2026-05-07 01:49:57 +00:00
parent ed8a224f5a
commit 1602bd3eca
+6
View File
@@ -37,6 +37,12 @@ if [ $isInFile -eq 0 ]
chmod 600 /home/akanealw/.ssh/*
fi
# create config file in .ssh
if [[ ! -f /home/akanealw/.ssh/config ]]
then
touch /home/akanealw/.ssh/config
fi
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "server-akanealw")
if [ $isInFile -eq 0 ]
then