stockholm/bin/cac-ssh

18 lines
265 B
Plaintext
Raw Normal View History

2015-05-20 23:56:08 +00:00
#! /bin/sh
set -euf
2015-05-21 21:52:06 +00:00
server=$1
2015-05-20 23:56:08 +00:00
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" \
"$@"