• cosmic_slate@dmv.social
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 year ago

    It’s config language is designed for that, too. The following should work:

    # Set default username across all hosts
    Host *
        User default_username
    

    or

    # To match "host1..3"
    Match Host host1.example.com host2.example.com host3.example.com
        User default_username
    

    I still think the script is a good idea. I do something similar with a shell script to add entries. Your choice of Python would make maintaining and parsing a lot more straightforward than shell.