a doubt about ssh-public-key-authentication (dropbear)

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
sam95
DD-WRT Novice


Joined: 16 Jun 2025
Posts: 8

PostPosted: Thu Aug 07, 2025 0:02    Post subject: a doubt about ssh-public-key-authentication (dropbear) Reply with quote
Please, I need your help:

In:

Quote:

Firmware: DD-WRT v3.0-r61954 std (07/17/25)
Dlink-DIR880L
Operating as: Gateway


Some nvram settings about ssh:

Quote:

sshd_replace=0
limit_ssh=1
sshd_ed25519_host_key=-----BEGIN OPENSSH PRIVATE KEY-----
sshd_forwarding=0
remote_mgt_ssh=0
sshd_port=22
sshd_passwd_auth=1
sshd_enable=1
sshd_rw=262144
sshd_authorized_keys=ssh-rsa [...omitted...]== [a-label-omitted]


(The dropbear server is running in the router and listening at the sshd port.)

The issue is that, from Linux, I'm able to ssh-login into the router with the password, but I'm not able to login with the ssh-agent/public-key. (As a comparison, from that same terminal session where ssh-login into the router with the ssh-agent/public-key fails, I'm able to ssh-login into another Linux box with the ssh-agent/public-key. The SSH_AGENT_PID and the SSH_AUTH_SOCK environment variables are set in that terminal session.)

I don't know if it is that the sshd_authorized_keys= value lacks a new-line at the end (my sshd_authorized_keys=... is a single line, while, as a comparison, the sshd_ed25519_host_key= value does have a new-line at the end: like the empty line after "-----END OPENSSH PRIVATE KEY-----" below:

Quote:

sshd_ed25519_host_key=-----BEGIN OPENSSH PRIVATE KEY-----
[...omitted...]
-----END OPENSSH PRIVATE KEY-----

Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 17390
Location: Texas, USA

PostPosted: Thu Aug 07, 2025 0:10    Post subject: Reply with quote
The problem is that your authorized key(s) is(are) rsa, not ed25519, methinks. RSA keys are no longer supported for key-based authentication with SSH / dropbear in DD-WRT. Create ED25519 key(s) for SSH on your linux box and put that in the authorized keys textbox and remove the RSA key(s).
Code:
sshd_authorized_keys=ssh-rsa [...omitted...]== [a-label-omitted]

P.S. You don't use the ed25519 key from the router itself...
sam95
DD-WRT Novice


Joined: 16 Jun 2025
Posts: 8

PostPosted: Thu Aug 07, 2025 0:49    Post subject: Reply with quote
Thanks!

The agent-authentication works with a ssh-ed25519 key.

Thanks!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum