source: client/boot-tools/clientstructure/root/importSshKeys.sh @ cceeb84

Last change on this file since cceeb84 was b1ccf9b, checked in by adv <adv@…>, 14 years ago

version1.0 renombrando ogclient boot-tools

git-svn-id: https://opengnsys.es/svn/branches/version1.0@1764 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 459 bytes
Line 
1#!/bin/bash
2echo "comprobando directorio .ssh del root"
3if [ ! -d /root/.ssh ]
4then
5    echo "creando directorio .ssh 600"
6        mkdir -p /root/.ssh
7        chmod 700 /root/.ssh
8fi
9echo "creando el fichero authorized_keys"
10touch /root/.ssh/authorized_keys
11chmod 600 /root/.ssh/authorized_keys
12
13echo "importando la clave publica del servidor OG"
14cat /tmp/id_rsa.pub
15
16[ -f /tmp/id_rsa.pub ] && cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys || echo "no key publica og"
17 
Note: See TracBrowser for help on using the repository browser.