mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
This doesn't require any entries in /etc/hosts and the correct SSH config is used to allow password-less access.
21 lines
318 B
Bash
Executable File
21 lines
318 B
Bash
Executable File
#!/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
|