some way to login without needing a browser session #2116

Open
opened 2025-11-20 07:04:06 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @weatherhead99 on GitHub (Jul 28, 2025).

Is your feature request related to a problem? Please describe.
I have access via multiple SSH proxy jumps to a machine with netbird client installed and already enrolled. This machine's login has expired. I would like to re-authenticate the machine without using a browser. Note that netbird up --no-browser does not help, because whilst that lets me open the authentication window on a local browser, the redirect to localhost then fails because localhost is a different machine

Describe the solution you'd like
some way of passing back the OIDC token via the command line or similar (perhaps akin to how rclone handles OIDC/oauth logins on headless machines). Maybe the option --headless to netbird up or similar. An alternative would be to allow the use of setup keys for machine logins, rather than just for enrollment (when I try netbird up --setup-key, it gives me "Error: login failed: rpc error: code = PermissionDenied desc = peer login has expired, please log in once more"

Describe alternatives you've considered
I could try and use e.g. X forwarding or simliar to get a graphical browser on the machine but this is quite inconvenient. (In this particular case it's even more inconvenient because the machine in question happens to be a Windows machine!).

Originally created by @weatherhead99 on GitHub (Jul 28, 2025). **Is your feature request related to a problem? Please describe.** I have access via multiple SSH proxy jumps to a machine with netbird client installed and already enrolled. This machine's login has expired. I would like to re-authenticate the machine without using a browser. Note that `netbird up --no-browser` does not help, because whilst that lets me open the authentication window on a local browser, the redirect to localhost then fails because localhost is a different machine **Describe the solution you'd like** some way of passing back the OIDC token via the command line or similar (perhaps akin to how rclone handles OIDC/oauth logins on headless machines). Maybe the option --headless to `netbird up` or similar. An alternative would be to allow the use of setup keys for machine logins, rather than just for enrollment (when I try netbird up --setup-key, it gives me "Error: login failed: rpc error: code = PermissionDenied desc = peer login has expired, please log in once more" **Describe alternatives you've considered** I could try and use e.g. X forwarding or simliar to get a graphical browser on the machine but this is quite inconvenient. (In this particular case it's even more inconvenient because the machine in question happens to be a Windows machine!).
saavagebueno added the feature-request label 2025-11-20 07:04:06 -05:00
Author
Owner

@1nerdyguy commented on GitHub (Jul 29, 2025):

Wouldn't this be a perfect use case for a setup key? or do you have different users with different ACL's logging into these machines?

@1nerdyguy commented on GitHub (Jul 29, 2025): Wouldn't this be a perfect use case for a setup key? or do you have different users with different ACL's logging into these machines?
Author
Owner

@lixmal commented on GitHub (Jul 29, 2025):

You will need to configure the device flow for your IDP/management.
Alternatively, you can copy/paste the URL you were redirected to in the browser and curl or wget it on the original machine.

use of setup keys for machine logins, rather than just for enrollment (when I try netbird up --setup-key, it gives me "Error: login failed: rpc error: code = PermissionDenied desc = peer login has expired, please log in once more"

you need to remove the existing /etc/netbird/config.json (now /var/lib/netbird/default.json) first

@lixmal commented on GitHub (Jul 29, 2025): You will need to configure the device flow for your IDP/management. Alternatively, you can copy/paste the URL you were redirected to in the browser and `curl` or `wget` it on the original machine. >use of setup keys for machine logins, rather than just for enrollment (when I try netbird up --setup-key, it gives me "Error: login failed: rpc error: code = PermissionDenied desc = peer login has expired, please log in once more" you need to remove the existing `/etc/netbird/config.json` (now `/var/lib/netbird/default.json`) first
Author
Owner

@weatherhead99 commented on GitHub (Jul 29, 2025):

setupkeys are a perfectly good solution for this particular machine yes! @lixmal fine I could do that but this is a windows client (that I can access by ssh). Where would that file be - I installed netbird via winget ?

@weatherhead99 commented on GitHub (Jul 29, 2025): setupkeys are a perfectly good solution for this particular machine yes! @lixmal fine I could do that but this is a windows client (that I can access by ssh). Where would that file be - I installed netbird via `winget` ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2116