Sample Header Ad - 728x90

Add multiple interfaces to one IPv6 Hostname in SSH config

1 vote
1 answer
501 views
Right now I have the following ~/.ssh/config to reach an embedded device via its link-local IPv6:
Host someDevice
    # Hostname fe80::dcad:beff:feef:cafe%%eth0
    Hostname fe80::dcad:beff:feef:cafe%%enxf875a44106f9
    User root
    [some more options...]
I don't want manual interaction every time my network interface changes. - With both commented in, SSH will simply use the first. - Using a different host for each is impractical. Has anyone already automated this? Right now, I'm looking into match as well as /etc/hosts file to achieve this. I prefer, if the configuration happens in the SSH config file.
Asked by Mo_ (257 rep)
Aug 8, 2023, 11:10 AM
Last activity: Aug 10, 2023, 10:45 AM