What's new

Asuswrt-Merlin SSH with RSA key

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

GoldWing

Regular Contributor
Hello,


After my initial experience in this forum I've learned that I need to learn a LOT. :)

So I've upgraded my router to an Asus GT-AX6000, and flashed the Asus-Merlin firmware version 388.1 per https://www.asuswrt-merlin.net/.

What I've done is loaded AMTM with Skynet per
which opened my eyes to what potential exploits that occur out on the Internet with your router.

After this initial experience I decided that SSH into the router via RSA keys would me most desirable for me going forward. WOW! What an experience trying to determine HOW to do that! I spent a LOT of time looking for the solution.

After reading a LOT I've found IMHO the most condensed solution per https://superuser.com/questions/130...ssh-login-on-router-with-asus-merlin-firmware which which was successful for me. So I thought that I'd post the URL, and hopefully save time to others.

I thought that a few additional links would be helpful for others attempting to upgrade their home LAN. From my reading I've learned that the Asuswrt-Merlin is written using Busybox which IIRC is a subset of Linux. If I'm wrong, please feel free to correct me! FWIW and FYI the additional links that I found helpful are below.





Regards,


GoldWing
 
After reading a LOT I've found IMHO the most condensed solution per https://superuser.com/questions/130...ssh-login-on-router-with-asus-merlin-firmware which which was successful for me. So I thought that I'd post the URL, and hopefully save time to others.

After the initial euphoria after all of the research, subsequent success, and some after thought, I have to correct myself. :confused:

My problems with my earlier attempts and failures was the the public key pasted into the Asus's WUI was my public key did NOT have the carriage returns removed which are created when saving the public key using PuTTYgen's "Save Public Key" button which was what I used earlier in Asus's WUI. My bad! o_O

You really just have to just copy the public key in PuTTYGen interface text box with header "Public key for pasting ..." (dah) which is really all on 1 line and paste it to a text editor to paste latter into Asus's WUI. I removed the "/etc/dropbear/authorized_keys" file, and latter logged in with SSH successfully with my private key loaded into Putty. All you need is a key generator such as PuTTYgen for both the private and public key, plus a SSH client such as PuTTY to login into Asuswrt-Merlin after pasting your public key under Administration > System > Service. > Authorized Keys. BTW you may want to use a different port than the of 22. :)

What can I say other than the learning curve on public and private keys, PuTTY, PuTTYgen, Asuswrt-Merlin, SSH'ing. :eek:

See images below.

Regards,

GoldWing
 

Attachments

  • SSH_RSA_key_All_1_Line.JPG
    SSH_RSA_key_All_1_Line.JPG
    130.5 KB · Views: 253
  • Putty_Credentials_Private_Key.JPG
    Putty_Credentials_Private_Key.JPG
    62.3 KB · Views: 256
  • Putty_Host_Name.JPG
    Putty_Host_Name.JPG
    73.5 KB · Views: 253

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top