0
I'm trying to enable passwordless SSH login on my ASUS RT-AC68U home router which runs version 384.4_2 of Asuswrt-Merlin firmware (the most recent one at the time of posting this). Having read many posts and howtos (including this one), I still can't get it working.
I use PUTTYGEN to generate a pair of RSA-2048 keys, save the public key at ~/.ssh/authorized_keys
on the router, then try to connect with PUTTY, which I've limited to RSA only. As PUTTY negotiates the session encryption, it prompts to accept the public key provided by the server. I expect it to be my key from ~/.ssh/authorized_keys
but instead I'm always seeing the dropbear's own public key (from /etc/dropbear/dropbear_rsa_host_key
). I know it's that one by running dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key
.
The permission for ~/.ssh
folder is set to 700
, for ~/.ssh/authorized_keys
to 600
. The key is saved via the router's Web UI in the correct format (i.e., ssh-rsa AAAA...5iYw== rsa-key-20180401
, no line breaks). I tried both root
and admin
as the SSH user. I also tried everything from scratch, after resetting the router to the factory settings, with the same result.
Is there anything I'm missing? At this point, I think my only option would be to extract the dropbear's private key from /etc/dropbear/dropbear_rsa_host_key
and use it instead of generating my own.
Extracting drop ears private key won't help. Have you considered flashing kong dd-wrt. Adding your public keys via the web interface is trivial with that. – davidgo – 2018-04-01T00:05:41.083
@davidgo, I haven't tried dd-wrt, but i did try extracting dropbear's private key and use it with putty and it actually works. Just not happy that the private key lives in the router itself. – noseratio – 2018-04-01T02:12:36.837