From: Vincent Le Gallic Date: Mon, 6 Apr 2015 13:05:40 +0000 (+0200) Subject: [ssh_borne] Déplacement de la clef wifi des bornes X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=commitdiff_plain;h=99b200303dcca8ff47994e57931406f4b0446faa [ssh_borne] Déplacement de la clef wifi des bornes --- diff --git a/ssh_borne b/ssh_borne index dd44237..d64048f 100755 --- 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