918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Line | |
---|
1 | #!/bin/bash |
---|
2 | echo "comprobando directorio .ssh del root" |
---|
3 | if [ ! -d /root/.ssh ] |
---|
4 | then |
---|
5 | echo "creando directorio .ssh 600" |
---|
6 | mkdir -p /root/.ssh |
---|
7 | chmod 700 /root/.ssh |
---|
8 | fi |
---|
9 | |
---|
10 | |
---|
11 | echo "comprobando el fichero authorized_keys .ssh del root" |
---|
12 | if [ ! -f /root/.ssh/authorized_keys ] |
---|
13 | then |
---|
14 | echo "creando el fichero authorized_keys" |
---|
15 | touch /root/.ssh/authorized_keys |
---|
16 | chmod 600 /root/.ssh/authorized_keys |
---|
17 | fi |
---|
18 | |
---|
19 | ssh-keygen -q -f /root/.ssh/id_rsa -N "" |
---|
20 | cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys |
---|
21 | |
---|
22 | ## TODO: exportamos la publica a los repos |
---|
23 | cp /root/.ssh/id_rsa.pub /tmp/rsa.ogclient.pub |
---|
Note: See
TracBrowser
for help on using the repository browser.