Posted: Tue Oct 20, 2015 16:09 Post subject: Create SSH public key in DD-WRT?
I want to initiate an SSH connection from DD-WRT, as client, to a remote server running OpenSSH, but I can't figure out how to create the necessary public/private key pair in DD-WRT.
ssh-keygen isn't available, so I gather that I have to use dropbear. I've already got the autocreated dropbear_rsa_host_key; I take it that this is the private key.
dropbearkey -y -f dropbear_rsa_host_key is said to spit out the corresponding public key, but for me it returns nothing.
If I follow the instructions here and create a new key with dropbearkey -t rsa -f ~/.ssh/id_rsa I still don't get any output from dropbear -y.
What am I missing here?
Brainslayer 14929 on WNDR3300.
Last edited by mc510 on Tue Oct 20, 2015 16:12; edited 1 time in total
You mean use puttygen to create the keypair on a Windows computer, then copy over to DD-WRT? I was thinking about that as a fallback option ... isn't it also necessary to convert the puttygen private key to dropbear format?
You can skip the dropbear part, you won't need it. _________________ Routers:
Netgear R8000 - DD-WRT v3.0-r43420 std (06/15/20)
Netgear R9000 - DD-WRT v3.0-r43420 std (06/15/20)
Okay, got it to work, but it did require a few extra steps. And for anyone coming across this thread, let me reiterate that I am not trying to connect from a PC to my DD-WRT router! I am trying to connect from my DD-WRT router to a remote server.
On Windows, I ran puttygen to create a public and private key (limited to 1024 bits for no real reason), then used puttygen's 'convert' function to save the private key as OpenSSH.
Copied the public key from puttygen and appended to authorized_keys on the remote server.
Copied the new private key to DD-WRT .ssh directory, then ran dropbearconvert openssh dropbear ./id_rsa ./id_rsa.dropbear.
Okay, got it to work, but it did require a few extra steps. And for anyone coming across this thread, let me reiterate that I am not trying to connect from a PC to my DD-WRT router! I am trying to connect from my DD-WRT router to a remote server.
On Windows, I ran puttygen to create a public and private key (limited to 1024 bits for no real reason), then used puttygen's 'convert' function to save the private key as OpenSSH.
Copied the public key from puttygen and appended to authorized_keys on the remote server.
Copied the new private key to DD-WRT .ssh directory, then ran dropbearconvert openssh dropbear ./id_rsa ./id_rsa.dropbear.
you sir (maybe madam, didn't check ) are a frigging genius. I've been wanting to do the same (use dd-wrt to ssh to elsewhere using keys) and this had me stumped. For me I already had the oopenshh key I just needed the convert advice!