Roaming ssh over IPv4/v6 HOWTO: You have a well-connected box "foo" somewhere. At home, you have proper inbound IPv6, but no inbound IPv4. One of your boxen is named "bar" and you want to get to it. You don't want to degrade to IPv4 when not needed -- 𝑒𝑠𝑝𝑒𝑐𝑖𝑎𝑙𝑙𝑦 when you're home; going over the 'Net from laptop on the desk to your regular machine under that very same desk would be comcastically slow. On your laptop: .--[ .ssh/config ] Match host bar !exec "ip -6 route|grep -q default" Hostname bar.domain.net ProxyJump foo-jump Match host bar exec "ip -6 route|grep -q default" Hostname bar.domain.net # the above repeated eleventy times, for each host Host foo-jump User jump Hostname foo.domain.net IdentityFile /home/$USER/.ssh/id_rsa.jump `---- (unlike the normal key, id_rsa.jump is passwordless) On the server: .--[ /etc/passwd ] jump:x:1003:1003:,,,:/home/jump:/bin/false `---- .--[ /home/jump/.ssh/authorized_keys ] ssh-rsa AAAABlahBlahBlahityBlah jump@laptop `----