How to realize dropbear with public key authentication?

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
pwcpp
Posts: 22
Joined: Sun Feb 15, 2015 2:12 pm

How to realize dropbear with public key authentication?

Post by pwcpp »

Dropbear with public key authentication works well on my Netgear WNDR4300 router (OpenWrt BB 14.07). But the same public key "/etc/dropbear/authorized_keys" doesn't work with Gargoyle 1.7.0. It will just prompt "server refused our key".

I've reproduced the public key in according to the following WIKI instruction. But neither RSA nor DSA one did work. :(
http://wiki.openwrt.org/oldwiki/Dropbea ... ationHowto

Are there any ideas? THX in adv.

pwcpp
Posts: 22
Joined: Sun Feb 15, 2015 2:12 pm

Re: How to realize dropbear with public key authentication?

Post by pwcpp »

Just now I found "/root/.ssh/authorized_keys" was OK, not the same path "/etc/dropbear/authorized_keys" mentioned in OpenWrt wiki.

zeroxia
Posts: 1
Joined: Sat Jan 23, 2016 9:55 am

Re: How to realize dropbear with public key authentication?

Post by zeroxia »

I'm on Gargoyle 1.8.0, the router is Netgear WNDR4300.

I have exactly the same problem.

I have put authorized_keys at both: /etc/dropbear and /root/.ssh
pubkey auth still not working.

I deleted all those authorized_keys. And on a Linux system, run ssh-copy-id, and then I found /root/.ssh/authorized_keys was created, but ssh to WNDR4300 still required password authentication.

Is there anything wrong with my version of Gargoyle?

nworbnhoj
Posts: 916
Joined: Mon Jul 21, 2014 10:08 am
Location: Australia
Contact:

Re: How to realize dropbear with public key authentication?

Post by nworbnhoj »

works ok for me on Gargoyle 1.9.0 and I would be surprised if there is a problem in this regard with other gargoyle versions

I followed the same instructions at https://wiki.openwrt.org/oldwiki/Dropbe ... ationHowto

Note that If you set a password on your dsa key in the ssh-keygen step then you will need to enter this password when you use it.

You can create a dsa key without a password and store it securely on your PC. That is, on a Linux system, use a strong password on your account and set the permissions in the dsa private key to -rw-------
Can you help someone else get Gargoyle up and running?
TL-WDR3600 : Gargoyle 1.9.0 : NBN FixedWireless
TL-WR1043ND-V2 : Gargoyle 1.8.0 : 3G Huawei E160E

Walton
Posts: 34
Joined: Tue Aug 30, 2011 12:00 am

Re: How to realize dropbear with public key authentication?

Post by Walton »

I have just set up 1.8.1 on a WNDR3800 and found I had to create /root/.ssh and copy authorized_keys to there to get public key authentication working.

It's now working fine

Post Reply