[GH-ISSUE #5455] SSH config doesn't use socket of configured netbird instance #10601

Open
opened 2026-08-05 01:26:34 -04:00 by saavagebueno · 1 comment
Owner

Originally created by @wpyoga on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5455

Describe the problem

After configuring netbird as a client, for example using systemctl enable netbird@main.service, there is a file created /etc/ssh/ssh_config.d/99-netbird.conf. Thereafter, whenever I run ssh, this config is picked up, and there is a warning. This seems related to #5453 , but not the same.

To Reproduce

Steps to reproduce the behavior:

  1. Install netbird
  2. Enable & bring up a netbird client instance
  3. Use ssh to connect to a remote server
  4. See the warning message

Expected behavior

I don't need to see this warning message. If #5453 is fixed, then this issue goes away.

BUT, is this the intended behavior? This is the contents of the file /etc/ssh/ssh_config.d/99-netbird.conf:

# NetBird SSH client configuration
# Generated automatically - do not edit manually
#
# To disable SSH config management, use:
#   netbird service reconfigure --service-env NB_DISABLE_SSH_CONFIG=true
#

Host 100.89.29.43 hostA.netbird.cloud hostA 100.89.50.120 hostB.netbird.cloud hostB
    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

Note that the exec line doesn't specify any netbird socket. Should it specify a specific instance socket?

Are you using NetBird Cloud?

NetBird Cloud

NetBird version

0.66.0

Is any other VPN software installed?

Tailscale

Additional context

NetBird 0.66.0 installed from AUR (Arch Linux)

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 @wpyoga on GitHub (Feb 26, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5455 **Describe the problem** After configuring netbird as a client, for example using `systemctl enable netbird@main.service`, there is a file created `/etc/ssh/ssh_config.d/99-netbird.conf`. Thereafter, whenever I run ssh, this config is picked up, and there is a warning. This seems related to #5453 , but not the same. **To Reproduce** Steps to reproduce the behavior: 1. Install netbird 2. Enable & bring up a netbird client instance 3. Use ssh to connect to a remote server 4. See the warning message **Expected behavior** I don't need to see this warning message. If #5453 is fixed, then this issue goes away. BUT, is this the intended behavior? This is the contents of the file `/etc/ssh/ssh_config.d/99-netbird.conf`: ``` # NetBird SSH client configuration # Generated automatically - do not edit manually # # To disable SSH config management, use: # netbird service reconfigure --service-env NB_DISABLE_SSH_CONFIG=true # Host 100.89.29.43 hostA.netbird.cloud hostA 100.89.50.120 hostB.netbird.cloud hostB 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 ``` Note that the exec line doesn't specify any netbird socket. Should it specify a specific instance socket? **Are you using NetBird Cloud?** NetBird Cloud **NetBird version** 0.66.0 **Is any other VPN software installed?** Tailscale **Additional context** NetBird 0.66.0 installed from AUR (Arch Linux) **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:26:34 -04:00
Author
Owner

@jakob1379 commented on GitHub (May 7, 2026):

slightly related, in my config I have:


Host *
  ForwardAgent yes
  ServerAliveInterval 30
  ServerAliveCountMax 3
  AddKeysToAgent yes
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h-%p
  ControlPersist yes

so I get a shared socket for each <user>@<host>-<port> permutation.

Since netbird likes to manage its own socket before showing the oauth in the browser I will have to remove the socket manually or by using ssh -o ControlMaster=no -o ControlPath=none my_machine

this can be done with the appropriate match-block:

  Match exec "${pkgs.netbird}/bin/netbird ssh detect %h %p"
  ControlMaster no
  ControlPath none
  ControlPersist no

This would be nice to have in the netbird ssh config or at least show a warning. Nothing really shows up the warning that cues this behavior.

<!-- gh-comment-id:4397225182 --> @jakob1379 commented on GitHub (May 7, 2026): slightly related, in my config I have: ```conf Host * ForwardAgent yes ServerAliveInterval 30 ServerAliveCountMax 3 AddKeysToAgent yes ControlMaster auto ControlPath ~/.ssh/sockets/%r@%h-%p ControlPersist yes ``` so I get a shared socket for each `<user>@<host>-<port>` permutation. Since netbird likes to manage its own socket before showing the oauth in the browser I will have to remove the socket manually or by using `ssh -o ControlMaster=no -o ControlPath=none my_machine` this can be done with the appropriate match-block: ```conf Match exec "${pkgs.netbird}/bin/netbird ssh detect %h %p" ControlMaster no ControlPath none ControlPersist no ``` This would be nice to have in the netbird ssh config or at least show a warning. Nothing really shows up the warning that cues this behavior.
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#10601