]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
storage_deploy.sh: change to local dir, rework rsa keys
authorThilo Fromm <thilo.fromm@profitbricks.com>
Thu, 25 Apr 2013 14:27:40 +0000 (16:27 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Tue, 30 Apr 2013 13:18:06 +0000 (15:18 +0200)
Signed-off-by: Thilo Fromm <thilo.fromm@profitbricks.com>
.ssh/id_rsa.storage-auto-deploy [new file with mode: 0644]
.ssh/id_rsa.storage-auto-deploy.pub [new file with mode: 0644]
id_rsa.storage-auto-deploy [deleted file]
id_rsa.storage-auto-deploy.pub [deleted file]
storage_deploy.sh

diff --git a/.ssh/id_rsa.storage-auto-deploy b/.ssh/id_rsa.storage-auto-deploy
new file mode 100644 (file)
index 0000000..936a66e
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA0eNnqeHTiG0vYxf09JMs0AIMNXdGJC/Vsl/2z3W71QJGv28S
+AWi2sa7PdsODEXcagfb3RmsGdccjBFnkbt0r2OU6Cj/DyuNT8tAhZHwjiCKpgIdc
+1QdmefrRjx2E7C+z0/JlKer8e3soI2z9eBb0JjK8ponVEy1VEcD63UKOpmMbxLJg
+AT009Svn6Qh5htVgiJU2WxBU7JLMybFc2mmqdGlbEZmANfOZO+M+Bz4yMjrbuQkP
+KCU0gJtDoKaRz0SgPeAAtnTg48inN9EMeAh539e9WuFA2Ug+IX4UgdLl01MYZSfB
+OVNyv26diGU7lcBJPzro70QxoGNp4I+m7du2dwIDAQABAoIBAQDCdvEILIziPU+H
+f53csTP28b7AFuetBYj4gQNbSlkizb4hBlbnaU7EKBRelF0u5Gxx+BE5dFYC7+OY
+13TX5yIGDrSM5HGS3LdeJMqboI0HSB5GUKSJWBbxc5uP/yi18Kir+k0S3n7aJcyV
+rhjWmGXTsnSp1NDPuNO15FhKgq1KqKFXTDzRUIIhU/TEH01J6EnRM8I4En9IvXZ6
+J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a.storage-auto-deploy.pub b/.ssh/id_rsa.storage-auto-deploy.pub
new file mode 100644 (file)
index 0000000..16570c9
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDR42ep4dOIbS9jF/T0kyzQAgw1d0YkL9WyX/bPdbvVAka/bxIBaLaxrs92w4MRdxqB9vdGawZ1xyMEWeRu3SvY5ToKP8PK41Py0CFkfCOIIqmAh1zVB2Z5+tGPHYTsL7PT8mUp6vx7eygjbP14FvQmMrymidUTLVURwPrdQo6mYxvEsmABPTT1K+fpCHmG1WCIlTZbEFTskszJsVzaaap0aVsRmYA185k74z4HPjIyOtu5CQ8oJTSAm0OgppHPRKA94AC2dODjyKc30Qx4CHnf171a4UDZSD4hfhSB0uXTUxhlJ8E5U3K/bp2IZTuVwEk/OujvRDGgY2ngj6bt27Z3 storageautoinstaller@host
diff --git a/id_rsa.storage-auto-deploy b/id_rsa.storage-auto-deploy
deleted file mode 100644 (file)
index 936a66e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEA0eNnqeHTiG0vYxf09JMs0AIMNXdGJC/Vsl/2z3W71QJGv28S
-AWi2sa7PdsODEXcagfb3RmsGdccjBFnkbt0r2OU6Cj/DyuNT8tAhZHwjiCKpgIdc
-1QdmefrRjx2E7C+z0/JlKer8e3soI2z9eBb0JjK8ponVEy1VEcD63UKOpmMbxLJg
-AT009Svn6Qh5htVgiJU2WxBU7JLMybFc2mmqdGlbEZmANfOZO+M+Bz4yMjrbuQkP
-KCU0gJtDoKaRz0SgPeAAtnTg48inN9EMeAh539e9WuFA2Ug+IX4UgdLl01MYZSfB
-OVNyv26diGU7lcBJPzro70QxoGNp4I+m7du2dwIDAQABAoIBAQDCdvEILIziPU+H
-f53csTP28b7AFuetBYj4gQNbSlkizb4hBlbnaU7EKBRelF0u5Gxx+BE5dFYC7+OY
-13TX5yIGDrSM5HGS3LdeJMqboI0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1SjDHY+vdhd9q
-NsjUIKs/FDpgIoUgc+YJaFViz4KbNoHGAo5q5dDINGhFlB+jK8wg1g==
------END RSA PRIVATE KEY-----
diff --git a/id_rsa.storage-auto-deploy.pub b/id_rsa.storage-auto-deploy.pub
deleted file mode 100644 (file)
index 16570c9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDR42ep4dOIbS9jF/T0kyzQAgw1d0YkL9WyX/bPdbvVAka/bxIBaLaxrs92w4MRdxqB9vdGawZ1xyMEWeRu3SvY5ToKP8PK41Py0CFkfCOIIqmAh1zVB2Z5+tGPHYTsL7PT8mUp6vx7eygjbP14FvQmMrymidUTLVURwPrdQo6mYxvEsmABPTT1K+fpCHmG1WCIlTZbEFTskszJsVzaaap0aVsRmYA185k74z4HPjIyOtu5CQ8oJTSAm0OgppHPRKA94AC2dODjyKc30Qx4CHnf171a4UDZSD4hfhSB0uXTUxhlJ8E5U3K/bp2IZTuVwEk/OujvRDGgY2ngj6bt27Z3 storageautoinstaller@host
index 9668f8ccdb521c2ef87348c0fdc0dcfb80f995db..0c1d16884ef4376fed414314c2abcaa4ad6c2acb 100755 (executable)
@@ -11,7 +11,10 @@ log() {
 # ----
 
 prepare() {
-    chmod 600 id_rsa.storage-auto-deploy
+    cd `dirname $0`
+
+    chmod 700 .ssh
+    chmod 600 .ssh/id_rsa.storage-auto-deploy
 }
 # ----
 
@@ -19,7 +22,7 @@ prepare() {
 rexec() {
     local srv="$1" ; shift
 
-    ssh -i id_rsa.storage-auto-deploy       \
+    ssh -i .ssh/id_rsa.storage-auto-deploy  \
         -o UserKnownHostsFile=/dev/null     \
         -o StrictHostKeyChecking=no         \
         -o PasswordAuthentication=no        \