ssh: handshake failed: ssh: unable to authenticate #2355

Closed
opened 2025-11-20 07:08:26 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @clarkmcc on GitHub (Oct 7, 2025).

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). 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
@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

@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
@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 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2355