Create einrichtung_client.sh

This commit is contained in:
Hobbabobba
2021-10-14 07:51:02 +02:00
committed by GitHub
parent 0a30545295
commit 20c3b035ef

9
einrichtung_client.sh Normal file
View File

@@ -0,0 +1,9 @@
!/bin/bash
apt install curl
echo -e "PubkeyAuthentication yes \nPasswordAuthentication yes \nAuthorizedKeysCommand /usr/local/bin/userkeys.sh \nAuthorizedKeysCommandUser nobody" >> /etc/ssh/sshd_config
touch /usr/local/bin/userkeys.sh
echo "#!/bin/bash" >> /usr/local/bin/userkeys.sh
echo "curl -sf https://raw.githubusercontent.com/Hobbabobba/keyserver/main/\$1/keys" >> /usr/local/bin/userkeys.sh
chmod a+x /usr/local/bin/userkeys.sh
service ssh restart
echo "FERTIG"