[GH-ISSUE #4604] ssh: handshake failed: ssh: unable to authenticate #9055

Open
opened 2026-08-05 01:20:39 -04:00 by saavagebueno · 7 comments
Owner

Originally created by @clarkmcc on GitHub (Oct 7, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4604

Duplicate of https://github.com/netbirdio/netbird/issues/3832, but this issue never had a reported solution and was closed.


When trying to use SSH over netbird, I get an "unable to authenticate" error. Both peers are on v0.59.3. This host is online and I can ping it from my macOS machine, but SSH doesn't seem to work.

Image
sudo netbird ssh 68e5865f74c49e0146048ab1
Password:
Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Couldn't connect. Please check the connection status or if the ssh server is enabled on the other peer
You can verify the connection by running:

 netbird status

Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

When I run status

netbird status -d
Peers detail:
 68e5865f74c49e0146048ab1.netbird.selfhosted:
  NetBird IP: 100.102.23.24
  Public key: ZrcQmtRcOZBVu4LP0NSZ/vKGSvnynuj9BiS+OO7B6QU=
  Status: Connected
  -- detail --
  Connection type: P2P
  ICE candidate (Local/Remote): host/prflx
  ICE candidate endpoints (Local/Remote): 192.168.0.200:51820/192.168.0.20:44078
  Relay server address: rel://netbird-3.printtrackerpro.com:33080
  Last connection update: 2 minutes, 15 seconds ago
  Last WireGuard handshake: 2 minutes, 16 seconds ago
  Transfer status (received/sent) 48.1 KiB/60.2 KiB
  Quantum resistance: false
  Networks: -
  Latency: 6.521083ms
Originally created by @clarkmcc on GitHub (Oct 7, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4604 Duplicate of https://github.com/netbirdio/netbird/issues/3832, but this issue never had a reported solution and was closed. --- When trying to use SSH over netbird, I get an "unable to authenticate" error. Both peers are on v0.59.3. This host is online and I can ping it from my macOS machine, but SSH doesn't seem to work. <img width="2412" height="938" alt="Image" src="https://github.com/user-attachments/assets/7fdc4127-5db0-4acd-ac1d-af6c74fb1375" /> ``` sudo netbird ssh 68e5865f74c49e0146048ab1 Password: Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain Couldn't connect. Please check the connection status or if the ssh server is enabled on the other peer You can verify the connection by running: netbird status Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain ``` When I run status ``` netbird status -d Peers detail: 68e5865f74c49e0146048ab1.netbird.selfhosted: NetBird IP: 100.102.23.24 Public key: ZrcQmtRcOZBVu4LP0NSZ/vKGSvnynuj9BiS+OO7B6QU= Status: Connected -- detail -- Connection type: P2P ICE candidate (Local/Remote): host/prflx ICE candidate endpoints (Local/Remote): 192.168.0.200:51820/192.168.0.20:44078 Relay server address: rel://netbird-3.printtrackerpro.com:33080 Last connection update: 2 minutes, 15 seconds ago Last WireGuard handshake: 2 minutes, 16 seconds ago Transfer status (received/sent) 48.1 KiB/60.2 KiB Quantum resistance: false Networks: - Latency: 6.521083ms ```
Author
Owner

@clarkmcc commented on GitHub (Oct 8, 2025):

The plot thickens: I enabled "Allow SSH" on my macOS device, and was able to SSH to my mac from the linux device

$ sudo netbird ssh clarks-macbook-pro-2
Last login: Wed Oct  8 11:09:35 from 100.102.150.186

But I continue to be unable to SSH in the other direction

Image
<!-- gh-comment-id:3382495667 --> @clarkmcc commented on GitHub (Oct 8, 2025): The plot thickens: I enabled "Allow SSH" on my macOS device, and was able to SSH to my mac from the linux device ``` $ sudo netbird ssh clarks-macbook-pro-2 Last login: Wed Oct 8 11:09:35 from 100.102.150.186 ``` But I continue to be unable to SSH in the other direction <img width="4126" height="256" alt="Image" src="https://github.com/user-attachments/assets/b0cd6182-9bfe-43ea-92df-ce8625841638" />
Author
Owner

@SuperKali commented on GitHub (Oct 8, 2025):

I have the same issue

<!-- gh-comment-id:3382506465 --> @SuperKali commented on GitHub (Oct 8, 2025): I have the same issue
Author
Owner

@clarkmcc commented on GitHub (Oct 8, 2025):

Okay, I got it working. I spent a few hours this morning digging through the code to figure out what was wrong and eventually concluded that the issue was specific to key distribution on my macOS device. The root cause appears to have been an older (0.2x.x) version of Netbird still installed.

Interestingly, the newer Netbird GUI reported that the daemon was up to date, so I didn’t suspect it at first. It turns out I had both a Homebrew and a non-Homebrew installation. My guess is that the Netbird UI was communicating with the newer Homebrew daemon, while the SSH command was using the older CLI binary.

Image

I ran the following to fix

brew uninstall netbird-ui netbird

Then manually drug the app from the /Applications dir into trash to delete, and checked that everything was uninstalled

$ which netbird
netbird not found

And then reinstalled with

brew install --cask netbirdio/tap/netbird-ui
<!-- gh-comment-id:3382624802 --> @clarkmcc commented on GitHub (Oct 8, 2025): Okay, I got it working. I spent a few hours this morning digging through the code to figure out what was wrong and eventually concluded that the issue was specific to key distribution on my macOS device. The root cause appears to have been an older (0.2x.x) version of Netbird still installed. Interestingly, the newer Netbird GUI reported that the daemon was up to date, so I didn’t suspect it at first. It turns out I had both a Homebrew and a non-Homebrew installation. My guess is that the Netbird UI was communicating with the newer Homebrew daemon, while the SSH command was using the older CLI binary. <img width="900" height="190" alt="Image" src="https://github.com/user-attachments/assets/b850683d-3e05-4fa1-9e24-6a32908b6705" /> I ran the following to fix ``` brew uninstall netbird-ui netbird ``` Then manually drug the app from the `/Applications` dir into trash to delete, and checked that everything was uninstalled ``` $ which netbird netbird not found ``` And then reinstalled with ``` brew install --cask netbirdio/tap/netbird-ui ```
Author
Owner

@clarkmcc commented on GitHub (Jan 19, 2026):

I started getting this error again after a server upgrade to 0.63.0. I've re-installed my macOS client multiple times, and my netbird version is 0.63.0. The peer I'm trying to connect to is also running 0.63.0.

$ netbird version
0.63.0
Image
<!-- gh-comment-id:3769567136 --> @clarkmcc commented on GitHub (Jan 19, 2026): I started getting this error again after a server upgrade to 0.63.0. I've re-installed my macOS client multiple times, and my netbird version is 0.63.0. The peer I'm trying to connect to is also running 0.63.0. ``` $ netbird version 0.63.0 ``` <img width="616" height="214" alt="Image" src="https://github.com/user-attachments/assets/8f04ffe6-50e2-4fbb-83c7-74d94d8df063" />
Author
Owner

@clarkmcc commented on GitHub (Jan 21, 2026):

I did a fresh deployment of 0.63.0 on the server and on two peers and everything was working. Then I upgraded my server to 0.64.0 and then my peers to 0.64.0 and then started getting this error

sudo netbird ssh root@6789223db25c33868cc568a3
Failed to connect to root@6789223db25c33868cc568a3:22

Troubleshooting steps:
  1. Check peer connectivity: netbird status -d
  2. Verify SSH server is enabled on the peer
  3. Ensure correct hostname/IP is used
Error: dial 6789223db25c33868cc568a3:22: ssh handshake: ssh: handshake failed: host key verification failed: key for 6789223db25c33868cc568a3:22 not found in any known_hosts file

So I ran this

ssh-keyscan 6789223db25c33868cc568a3 >> ~/.ssh/known_hosts

And now I'm back to the original error all over again

sudo netbird ssh root@6789223db25c33868cc568a3
Failed to connect to root@6789223db25c33868cc568a3:22

Troubleshooting steps:
  1. Check peer connectivity: netbird status -d
  2. Verify SSH server is enabled on the peer
  3. Ensure correct hostname/IP is used
Error: dial 6789223db25c33868cc568a3:22: ssh handshake: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

Edit: interestingly, I was able to SSH through the web interface, but on my local MacBook Pro (also running 0.64.0 on the UI and daemon), I'm getting the errors above.

<!-- gh-comment-id:3780018724 --> @clarkmcc commented on GitHub (Jan 21, 2026): I did a fresh deployment of 0.63.0 on the server and on two peers and everything was working. Then I upgraded my server to 0.64.0 and then my peers to 0.64.0 and then started getting this error ``` sudo netbird ssh root@6789223db25c33868cc568a3 Failed to connect to root@6789223db25c33868cc568a3:22 Troubleshooting steps: 1. Check peer connectivity: netbird status -d 2. Verify SSH server is enabled on the peer 3. Ensure correct hostname/IP is used Error: dial 6789223db25c33868cc568a3:22: ssh handshake: ssh: handshake failed: host key verification failed: key for 6789223db25c33868cc568a3:22 not found in any known_hosts file ``` So I ran this ``` ssh-keyscan 6789223db25c33868cc568a3 >> ~/.ssh/known_hosts ``` And now I'm back to the original error all over again ``` sudo netbird ssh root@6789223db25c33868cc568a3 Failed to connect to root@6789223db25c33868cc568a3:22 Troubleshooting steps: 1. Check peer connectivity: netbird status -d 2. Verify SSH server is enabled on the peer 3. Ensure correct hostname/IP is used Error: dial 6789223db25c33868cc568a3:22: ssh handshake: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain ``` Edit: interestingly, I was able to SSH through the web interface, but on my local MacBook Pro (also running 0.64.0 on the UI and daemon), I'm getting the errors above.
Author
Owner

@clarkmcc commented on GitHub (Jan 21, 2026):

Okay, after I was able to get SSH to work through the web portal, I noticed in the MOTD that it said

Kernel was updated, please reboot

So I rebooted and now my macOS peer can SSH locally....

<!-- gh-comment-id:3780112924 --> @clarkmcc commented on GitHub (Jan 21, 2026): Okay, after I was able to get SSH to work through the web portal, I noticed in the MOTD that it said ``` Kernel was updated, please reboot ``` So I rebooted and now my macOS peer can SSH locally....
Author
Owner

@Extra-Citron-7630 commented on GitHub (May 25, 2026):

I just self hosted netbird and getting this issue:
SSH connection to NetBird server failed: SSH handshake: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain

I am able to ping the server, but can not create an SSH connection to that server

<!-- gh-comment-id:4539797829 --> @Extra-Citron-7630 commented on GitHub (May 25, 2026): I just self hosted netbird and getting this issue: ```SSH connection to NetBird server failed: SSH handshake: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain``` I am able to ping the server, but can not create an SSH connection to that server
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9055