diff options
Diffstat (limited to 'testing/ssh')
-rwxr-xr-x | testing/ssh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/ssh b/testing/ssh new file mode 100755 index 000000000..fc72c265e --- /dev/null +++ b/testing/ssh @@ -0,0 +1,20 @@ +#!/bin/bash + +DIR=$(dirname `readlink -f $0`) +. $DIR/testing.conf + +if [ $# == 0 ] +then + echo "$0 <host>" + exit 1 +fi + +host=$1 +ip="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`" +if [ -z $ip ] +then + echo "Host '$host' unknown" + exit 1 +fi + +exec ssh $SSHCONF -q root@$ip |