What's new

SSH Authentication key does not work with >= 4096 bits

  • 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!

mlamlam

New Around Here
Today I just tried to using auth key to authorize myself to remote using SSH on my newly bought asuswrt-merlin...

I flashed the newest version (374.41) on my AC66U.. configured some wifi SSID and final try to create 4096 bits public/private keys using puttygen

1. I generated 3 pairs of 4096 bits public/private keys.
2. Input those public keys in ssh-rsa xxxxxx ssh-rsa-keyname format, one line one key (so total three lines inside the textbox), I input those keys under Administration -> System -> SSH Authentication key
3. Save it.


Then I try to login using Public Key authorization, success!
1. But, when try to run "top" command, /sbin/init using 95-99.99% CPU for a long period of time
2. run "netstat -na" showing that port 80 is not listening anymore, thus the webui cannot be accessed anymore.
3. SSH runs OK without problem.

Then I try to reboot the router using command "reboot" in SSH, router rebooted but no internet access, no router web gui (weird that SSH is still working using key authorization.. Wi-Fi not work, LAN works so still can SSH to the router, checked using "netstat-na" and port 80 is not listening)

To solve the problem.. I erased nvram, restore the backup (thanks god) and generate 2048 bits key using puttygen again... and same as before, 3 pairs of keys generated, input those into the webgui and reboot... and now work as normal...

So may I know is it not supposed to support > 2048bits keys in SSH authorization? Thanks.
 
Those keys might be taking too much space and getting truncated. What is the number of total characters used by all those keys in the input field?

4096 bit is a bit overkill, especially for a home router.
 
Those keys might be taking too much space and getting truncated. What is the number of total characters used by all those keys in the input field?

4096 bit is a bit overkill, especially for a home router.

I generated 3 pairs of keys, so the textbox field has 3 lines, total around 2210 characters

if changed to 2048 bits, total around 1186 characters

Thanks.
 
I generated 3 pairs of keys, so the textbox field has 3 lines, total around 2210 characters

if changed to 2048 bits, total around 1186 characters

Thanks.

I think I have a limit set to 3000 or 3500 characters (I'm not at home right now to check), but there could be another size limitation elsewhere either in the firmware or in Dropbear itself.
 
I generate 4096-bit key(in PuttyGen) for my RT-N16 on 374.40 two months ago, and it work fine, including now, after upgrade to 374.41.
Total length of key: 736 characters.
 
Last edited:

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