From 6c8bb4c2c1c851b0894c2af8aeea00bfb8a51924 Mon Sep 17 00:00:00 2001 From: Julien Escario Date: Tue, 21 Apr 2020 21:50:47 +0200 Subject: [PATCH] Add SSH directory --- ssh/altinea.key | 1 + ssh/install_altinea_pubkey.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 ssh/altinea.key create mode 100644 ssh/install_altinea_pubkey.sh diff --git a/ssh/altinea.key b/ssh/altinea.key new file mode 100644 index 0000000..615d600 --- /dev/null +++ b/ssh/altinea.key @@ -0,0 +1 @@ +cert-authority ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5QQzt7jLunz/asO+1V0Blbm9KIOrgpESBqyQ0A9c4oB35k52d8npqdx3Dp7Jlu679h88NLnojWKGBC4BoW+A78PD9kX3wA+yejqUAq/YurmKcvhcUnl7me6S2IeidUiFzHXADNfybUqL9ZvfN0YtMVZwSYsNR4zn6SKYmt3VByPm0E9viJI/nPLWJfK4FHa2ggIU9QDZIdpGqhD4ErYN4ZWL5C6CGwMVr6+cASY3k7Sky9kEfQ4WaysuwWUeJKdDfjA4oMQr8ageEhYBR1lq5zg+eicoOcii/Cj9/M4Nxjm1F1MYDwKoyioMVB4bHm4meYh22xVzIM+ihY2F4b2n5 Altinea CA diff --git a/ssh/install_altinea_pubkey.sh b/ssh/install_altinea_pubkey.sh new file mode 100644 index 0000000..2dff2d6 --- /dev/null +++ b/ssh/install_altinea_pubkey.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [[ ! -d ~/.ssh ]]; +then + mkdir ~/.ssh + chmod 700 ~/.ssh +fi + +if [[ -w ~/.ssh/authorized_keys2 ]] +then + wget --no-check-certificate -q -O - https://wiki.altinea.fr/lib/exe/fetch.php/public:altinea.key >> ~/.ssh/authorized_keys2 +else + touch ~/.ssh/authorized_keys + wget --no-check-certificate -q -O - https://wiki.altinea.fr/lib/exe/fetch.php/public:altinea.key >> ~/.ssh/authorized_keys +fi + +echo "Clé SSH Altinea installée"