]> gitweb.pimeys.fr Git - scripts-20-100.git/blobdiff - ssh_borne
typo
[scripts-20-100.git] / ssh_borne
index e955b5952bacd566973bccecb3039a41e7f4edae..dc7027bd8dc84de34d6bc700b1ad3c8397cf60bb 100755 (executable)
--- a/ssh_borne
+++ b/ssh_borne
@@ -1,3 +1,12 @@
-#!/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.ap.crans.org
+if [[ "`hostname`" != "fy" ]];
+then
+    echo "À exécuter sur fy !"
+    exit 1
+fi
+
+borne=$1
+shift
+
+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@${borne}.wifi.crans.org $@