From 99b200303dcca8ff47994e57931406f4b0446faa Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 6 Apr 2015 15:05:40 +0200 Subject: [PATCH] =?utf8?q?[ssh=5Fborne]=20D=C3=A9placement=20de=20la=20cle?= =?utf8?q?f=20wifi=20des=20bornes?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ssh_borne | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.2