#!/usr/bin/env bash # Use nmap from podman to check for open SSH ports on local subnet. if test -x "$(command -v podman)"; then if sudo podman image exists localhost/nmap; then sudo podman run -it --rm \ --cap-add=NET_RAW \ --cap-add=NET_ADMIN \ --network host \ --name nmap \ nmap -sV -p 22 -open 10.0.0.0/24 else echo "localhost/nmap image does not exist" echo "Build it from github.com/hyperreal64/containerfiles" fi fi