diff --git a/debian/debian-configure-sshd.sh b/debian/debian-configure-sshd.sh index cebac40..38b2e76 100644 --- a/debian/debian-configure-sshd.sh +++ b/debian/debian-configure-sshd.sh @@ -25,3 +25,11 @@ if [ $isInFile -eq 0 ] sed s/#PasswordAuthentication yes/PasswordAuthentication no/g > /etc/ssh/sshd_config fi fi + +isInFile=$(cat /etc/hostname | grep -c "rsnapshotbackup") +if [ $isInFile -eq 0 ] + then + echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZ2vuz72vLxq5+iNQopIK19d0Y4TE3eExy9KRiNlAgk rsnapshotbackup" >> /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys + fi +fi