blob: 17a797f88ded894da95961f6821e1eda54be4ed2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
echo "comprobando directorio .ssh del root"
if [ ! -d /root/.ssh ]
then
echo "creando directorio .ssh 600"
mkdir -p /root/.ssh
chmod 700 /root/.ssh
fi
echo "creando el fichero authorized_keys"
touch /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
echo "importando la clave publica del servidor OG"
cat /tmp/id_rsa.pub
[ -f /tmp/id_rsa.pub ] && cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys || echo "no key publica og"
|