X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=ssh_borne;h=dc7027bd8dc84de34d6bc700b1ad3c8397cf60bb;hp=dd4423776805eb9cde64e288ff7c61c16c164d0c;hb=HEAD;hpb=b81af30fef0c7be7c798094275cdc411521f7568 diff --git a/ssh_borne b/ssh_borne index dd44237..dc7027b 100755 --- 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.wifi.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 $@