VS Code can show every computer name in your SSH setup, including names that live in a second file pulled in with Include. A search of only the main file misses those. OpenSSH has no command that prints the full list. ssh -G looks up one name. It does not list them.
This script reads the config on your computer and prints one name per line. It follows Include, including a folder wildcard. It skips Host * and any pattern that contains * or ?. It does not print addresses, users, or keys, and it does not send anything to this website.
Download it, then run:
python3 ssh-hosts.py.txt
To check the script itself, without reading your real config:
python3 ssh-hosts.py.txt --self-test
Made free by Pete De Paola · analogarcade.net