17 lines
441 B

  1. #!/bin/bash
  2. if [[ ! -d ~/.ssh ]];
  3. then
  4. mkdir ~/.ssh
  5. chmod 700 ~/.ssh
  6. fi
  7. if [[ -w ~/.ssh/authorized_keys2 ]]
  8. then
  9. wget --no-check-certificate -q -O - https://wiki.altinea.fr/lib/exe/fetch.php/public:altinea.key >> ~/.ssh/authorized_keys2
  10. else
  11. touch ~/.ssh/authorized_keys
  12. wget --no-check-certificate -q -O - https://wiki.altinea.fr/lib/exe/fetch.php/public:altinea.key >> ~/.ssh/authorized_keys
  13. fi
  14. echo "Clé SSH Altinea installée"