[GH-ISSUE #1558] option to use standard ssh client to connect to the peer's netbird ssh server #2658

Open
opened 2026-08-05 00:48:16 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @micmejia on GitHub (Feb 10, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1558

Is your feature request related to a problem? Please describe.
As expected, I can ssh to another peer via sudo netbird ssh <peer>.netbird.cloud

Describe the solution you'd like
But is it possible to connect to the same peer using standard ssh client? e.g. sudo ssh -p 44338 <peer>.netbird.cloud
Can I possibly extract the auto-generated key by netbird and feed it to the ssh command, -i option? If yes, where is it located.

I tried using the SSHKey in /etc/netbird/config.json by pasting it to a mykey file, but getting an error:
sudo ssh -p 44338 -i ./mykey -vv <peer>.netbird.cloud

the key seems too short anyway

debug1: Will attempt key: ./mykey  explicit
debug2: pubkey_prepare: done
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss>
debug1: kex_input_ext_info: ping@openssh.com (unrecognised)
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: ./mykey
Load key "./mykey": invalid format
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
mic13@<peer>.netbird.cloud: Permission denied (publickey).

Additional context
The intention is to use pyinfra's ssh connector without having to install a separate sshd on the peer:

pyinfra @ssh/<peer>.netbird.cloud configure_peer.py

pyinfra can accept ssh keys, etc:

  --ssh-user, --user TEXT         SSH user to connect as.
  --ssh-port, --port INTEGER      SSH port to connect to.
  --ssh-key, --key PATH           SSH Private key filename.
  --ssh-key-password, --key-password TEXT
                                  SSH Private key password.
  --ssh-password, --password TEXT
Originally created by @micmejia on GitHub (Feb 10, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1558 **Is your feature request related to a problem? Please describe.** As expected, I can ssh to another peer via `sudo netbird ssh <peer>.netbird.cloud` **Describe the solution you'd like** But is it possible to connect to the same peer using standard ssh client? e.g. `sudo ssh -p 44338 <peer>.netbird.cloud` Can I possibly extract the auto-generated key by netbird and feed it to the ssh command, `-i` option? If yes, where is it located. I tried using the `SSHKey` in `/etc/netbird/config.json` by pasting it to a `mykey` file, but getting an error: `sudo ssh -p 44338 -i ./mykey -vv <peer>.netbird.cloud` > the key seems too short anyway ``` debug1: Will attempt key: ./mykey explicit debug2: pubkey_prepare: done debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss> debug1: kex_input_ext_info: ping@openssh.com (unrecognised) debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: ./mykey Load key "./mykey": invalid format debug2: we did not send a packet, disable method debug1: No more authentication methods to try. mic13@<peer>.netbird.cloud: Permission denied (publickey). ``` **Additional context** The intention is to use [pyinfra's ssh connector](https://docs.pyinfra.com/en/2.x/connectors/ssh.html) without having to install a separate sshd on the peer: `pyinfra @ssh/<peer>.netbird.cloud configure_peer.py` pyinfra can accept ssh keys, etc: ``` --ssh-user, --user TEXT SSH user to connect as. --ssh-port, --port INTEGER SSH port to connect to. --ssh-key, --key PATH SSH Private key filename. --ssh-key-password, --key-password TEXT SSH Private key password. --ssh-password, --password TEXT ```
saavagebueno added the feature-request label 2026-08-05 00:48:16 -04:00
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#2658