[GH-ISSUE #5901] Incorrect ssh client configuration #11268

Closed
opened 2026-08-05 01:29:07 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @Chilinot on GitHub (Apr 16, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5901

Describe the problem

The netbird client installs an incorrect ssh config block under /etc/ssh/ssh_config.d/99-netbird.conf on linux systems.

From one of our linux machines:

$ cat /etc/ssh/ssh_config.d/99-netbird.conf
Host 100.86.107.176 netbird-gw-0-107-176.netbird.scrive.lan netbird-gw-0-107-176 100.86.219.247 common-netbird-gateway-2.netbird.scrive.lan common-netbird-gateway-2 100.86.9.117 common-netbird-gateway-1.netbird.scrive.lan common-netbird-gateway-1 100.86.246.156 common-netbird-gateway-3.netbird.scrive.lan common-netbird-gateway-3 100.86.239.200 netbird-gw-0-239-200.netbird.scrive.lan netbird-gw-0-239-200 100.86.131.76 netbird-gw-1-131-76.netbird.scrive.lan netbird-gw-1-131-76
    Match exec "/usr/bin/netbird ssh detect %h %p"
        PreferredAuthentications password,publickey,keyboard-interactive
        PasswordAuthentication yes
        PubkeyAuthentication yes
        BatchMode no
        ProxyCommand /usr/bin/netbird ssh proxy %h %p
        StrictHostKeyChecking no
        UserKnownHostsFile /dev/null
        CheckHostIP no
        LogLevel ERROR

To Reproduce

Steps to reproduce the behavior:

  1. Install netbird
  2. Connect to a self hosted instance (this is our use case, might be the same for netbird hosted as well)
  3. Check the contents of /etc/ssh/ssh_config.d/99-netbird.conf. It will contain both Host and Match at the same time, which is not correct according to specification (man ssh_config).

Expected behavior

The configuration block in /etc/ssh/ssh_config.d/99-netbird.conf should not combine Host ... and Match ... at the same time. Host only matches up to the next Host or Match, meaning it is useless since there are no extra configuration statements after the Host statement.

Are you using NetBird Cloud?

We are self hosting.

NetBird version

0.68.3-1, arch package

Is any other VPN software installed?

No
Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @Chilinot on GitHub (Apr 16, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5901 **Describe the problem** The netbird client installs an incorrect ssh config block under `/etc/ssh/ssh_config.d/99-netbird.conf` on linux systems. From one of our linux machines: ``` $ cat /etc/ssh/ssh_config.d/99-netbird.conf Host 100.86.107.176 netbird-gw-0-107-176.netbird.scrive.lan netbird-gw-0-107-176 100.86.219.247 common-netbird-gateway-2.netbird.scrive.lan common-netbird-gateway-2 100.86.9.117 common-netbird-gateway-1.netbird.scrive.lan common-netbird-gateway-1 100.86.246.156 common-netbird-gateway-3.netbird.scrive.lan common-netbird-gateway-3 100.86.239.200 netbird-gw-0-239-200.netbird.scrive.lan netbird-gw-0-239-200 100.86.131.76 netbird-gw-1-131-76.netbird.scrive.lan netbird-gw-1-131-76 Match exec "/usr/bin/netbird ssh detect %h %p" PreferredAuthentications password,publickey,keyboard-interactive PasswordAuthentication yes PubkeyAuthentication yes BatchMode no ProxyCommand /usr/bin/netbird ssh proxy %h %p StrictHostKeyChecking no UserKnownHostsFile /dev/null CheckHostIP no LogLevel ERROR ``` **To Reproduce** Steps to reproduce the behavior: 1. Install netbird 2. Connect to a self hosted instance (this is our use case, might be the same for netbird hosted as well) 3. Check the contents of `/etc/ssh/ssh_config.d/99-netbird.conf`. It will contain both `Host` and `Match` at the same time, which is not correct according to specification (`man ssh_config`). **Expected behavior** The configuration block in `/etc/ssh/ssh_config.d/99-netbird.conf` should not combine `Host ...` and `Match ...` at the same time. `Host` only matches _up to_ the next `Host` or `Match`, meaning it is useless since there are no extra configuration statements after the `Host` statement. **Are you using NetBird Cloud?** We are self hosting. **NetBird version** `0.68.3-1, arch package` **Is any other VPN software installed?** No **Have you tried these troubleshooting steps?** - [ ] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [ ] Checked for newer NetBird versions - [ ] Searched for similar issues on GitHub (including closed ones) - [ ] Restarted the NetBird client - [ ] Disabled other VPN software - [ ] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:29:07 -04:00
Author
Owner

@lixmal commented on GitHub (Apr 16, 2026):

Confirmed. Did you run into any issues with the Match block matching everything?

<!-- gh-comment-id:4260090566 --> @lixmal commented on GitHub (Apr 16, 2026): Confirmed. Did you run into any issues with the `Match` block matching everything?
Author
Owner

@Chilinot commented on GitHub (Apr 16, 2026):

Confirmed. Did you run into any issues with the Match block matching everything?

Yes, one of our engineers complained about having connectivity issues for all services not routed over netbird. If they wanted to SSH to something outside of the netbird mesh, they had to disable netbird first.

<!-- gh-comment-id:4262167917 --> @Chilinot commented on GitHub (Apr 16, 2026): > Confirmed. Did you run into any issues with the `Match` block matching everything? Yes, one of our engineers complained about having connectivity issues for all services not routed over netbird. If they wanted to SSH to something outside of the netbird mesh, they had to disable netbird first.
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11268