|
@ -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" |