]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
[ssh_borne] Déplacement de la clef wifi des bornes
authorVincent Le Gallic <legallic@crans.org>
Mon, 6 Apr 2015 13:05:40 +0000 (15:05 +0200)
committerVincent Le Gallic <legallic@crans.org>
Sun, 9 Aug 2015 16:09:03 +0000 (18:09 +0200)
ssh_borne

index dd4423776805eb9cde64e288ff7c61c16c164d0c..d64048f5e45ff41b404c10d52dc33fb3a7936551 100755 (executable)
--- a/ssh_borne
+++ b/ssh_borne
@@ -1,3 +1,9 @@
-#!/bin/sh
+#!/bin/bash
 
-ssh -i /usr/scripts/gestion/clef-wifi -o BatchMode=yes -o UserKnownHostsFile=~/.ssh/ssh_known_bornes -o ForwardX11=no -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 root@$1.wifi.crans.org
+if [[ "`hostname`" != "fy" ]];
+then
+    echo "À exécuter sur fy !"
+    exit 1
+fi
+
+ssh -i /etc/crans/secrets/id_rsa_wifi.adm -o BatchMode=yes -o UserKnownHostsFile=~/.ssh/ssh_known_bornes -o ForwardX11=no -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 root@$1.wifi.crans.org