javitu / rt-n56u

Automatically exported from code.google.com/p/rt-n56u
0 stars 2 forks source link

Cannot enter public key via UI #1281

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Go to http://192.168.1.1/Advanced_System_Content.asp
2.Click on 'authorized_keys' and paste public key there
3.Click on apply.

I would assume that the system will save my key and will use it. However, after 
applying my settings I still see that the key is empty in web ui and both 
/opt/home/admin/.ssh and /home/root/.ssh are empty, and logging via key is not 
accepted.

What version of the product are you using? On what operating system?
RT-N56U 3.0.3.8-081

Public key file can be downloaded from 
https://cloud.mail.ru/public/8e98d8b377b5/public.key

Original issue reported on code.google.com by DanilaGa...@gmail.com on 8 Jul 2014 at 7:14

GoogleCodeExporter commented 9 years ago
Have you rebooted the device after that?

Original comment by d...@soulblader.com on 11 Jul 2014 at 3:05

GoogleCodeExporter commented 9 years ago
No, but I've tried to reboot it now, the effect is the same - it says 'Server 
refused our key'. Maybe I have to do something else? How can I read the key 
from the NVRAM and check if has been stored correctly?

Original comment by DanilaGa...@gmail.com on 13 Jul 2014 at 6:59

GoogleCodeExporter commented 9 years ago
You tried to add the key which is available from the link, have you? If so it 
won't work as it's format is incorrect.
# ssh-keygen -i -m RFC4716 -f /path/to/public.key
ssh-rsa 
AAAAB3NzaC1yc2EAAAABJQAAAQEAgdlbPHx/mGxut8LjrApMt9e/pYudW+/QLrrpY6/xN/m//dxbga2p
TjlPmESRrrXUuzByZD3Q40/hKrN2GRxhB7hG6C9oK7wktHMicZen5X7+uAIa4IVfPq3tNh3m1aEJmXcq
F37e0i5OaAHJghuiLgUpmv9U0OM9S8Ga1pwBIhnkLJAcABPhe57VMNzHnfXUGPZjmLCe1/83gXGZcpBE
kfUOxjPgPSCcPmsOIK9p2ydAFGcThrgVPqeDKbYmUk8+Q6qKnqjOZ62tMDXz7Vk6Y4fpcIq05+TMffW/
cilnutRoipDOwA/HlQ8bRvto3lUb2hwOn895opvc2UDkM7Hm4Q==

Such form of key should be added to authorized_keys file.

Original comment by d...@soulblader.com on 29 Jul 2014 at 4:40

GoogleCodeExporter commented 9 years ago
Aha, i see, now it's working :-)

It seems that if you're using PuTTY to export the public key, it won't be 
accepted. You need to copy-paste from puttygen public key window.

It also would be nice to display an error, like 'key format is invalid'. 
Otherwise it's confusing - maybe the key was accepted, but not shown due to 
security reasons?

Original comment by DanilaGa...@gmail.com on 29 Jul 2014 at 8:09

GoogleCodeExporter commented 9 years ago
Maybe I'm wrong, but I think:
- such things like key format should be something like 'must know' before using 
authentication algorithm
- it is not a very good idea to keep unencrypted ssh private keys in Windows 

Original comment by d...@soulblader.com on 30 Jul 2014 at 12:36