X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=ssh_borne;h=dc7027bd8dc84de34d6bc700b1ad3c8397cf60bb;hp=e955b5952bacd566973bccecb3039a41e7f4edae;hb=9ad2a272dd90a939590df3881cbe98ad174d1214;hpb=c73ee4619165a69d0bb7ffab40cac22c25f917ee diff --git a/ssh_borne b/ssh_borne index e955b59..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.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 $@