wg-docker/docker/inspect.sh
2022-11-28 21:38:36 +01:00

9 lines
210 B
Bash
Executable file

#!/bin/bash
IPV4_ADDRESS=$(docker inspect $1 \
| grep \"IPAddress\" \
| tail -1 \
| awk '{ print $2 }' \
| sed -e 's/\"\(.*\)\"\,/\1/')
ssh -o StrictHostKeyChecking=no -ND $2 root@$IPV4_ADDRESS &