Skip to content

Instantly share code, notes, and snippets.

@jdwhite
jdwhite / proxy-utm-guest.sh
Created November 2, 2023 01:16
SSH ProxyCommand to connect to UTM guest on shared network.
#!/bin/bash
#
# Determine current IP address of the UTM guest VM and nc to it.
# Jason White (jdwhite@menelos.com)
# 2023-11-01
#
# Note: VMs must be named the same as the SSH hostname.
#
# ~/.ssh/config entry for host as follows:
#
#!/bin/bash
# highest-version - determine highest version of $0 and exec.
# May need to modify '${0}*' if it matches more than the
# intended ${0} -- '${0}-*' for example.
exec $(ls -1 ${0}* | sort -rV | head -1) "$@"