stockholm/bin/cac-ssh
2015-05-21 23:52:06 +02:00

18 lines
265 B
Bash
Executable File

#! /bin/sh
set -euf
server=$1
shift
address=$(echo $server | jq -r .ip)
target=root@$address
SSHPASS=$(echo $server | jq -r .rootpass)
export SSHPASS
exec sshpass -e ssh \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
"$target" \
"$@"