testing script
This commit is contained in:
42
debian/debian-configure-sshd.sh
vendored
42
debian/debian-configure-sshd.sh
vendored
@@ -26,9 +26,47 @@ if [ $isInFile -eq 0 ]
|
||||
fi
|
||||
fi
|
||||
|
||||
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "rsnapshotbackup")
|
||||
isInFile=$(cat /home/akanealw/.ssh/authorized_keys | grep -c "gamingpc-akanealw")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZ2vuz72vLxq5+iNQopIK19d0Y4TE3eExy9KRiNlAgk rsnapshotbackup" >> /root/.ssh/authorized_keys
|
||||
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
|
||||
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
|
||||
|
||||
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "gaminpc-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
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
|
||||
isInFile=$(cat /root/.ssh/authorized_keys | grep -c "server-root")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHWiw5lVzQIZiZc1SPphvHhdSpFl9UN6Xm4znFqq5xs4 server-root" >> /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user