Ssh to router, problem with permission

This is wrong place to store the private key!
In known_hosts the fingerprints of the servers that you connect are stored.
Please read the link I wrote above about creating a proper pair of keys. This problem you are facing is not related to OpenWrt.

2 Likes

I used putty to generate key

Use the ssh-keygen since you are in Linux Mint.

2 Likes

$ ls -l ~/.ssh/id_localrouter
-rw-rw-r-- 1 james james 81 Dec 2 13:23 /home/james/.ssh/id_localrouter

  • You should have:
    • a *.key file (we assume this is your id_localrouter file)
    • a *.pub file
  • Install .pub on OpenWrt
  • use the .key file to login
    • using the -i argument; or
    • installing in ssh config

chmod 600 /home/james/.ssh/id_localrouter

This should change the output to:

-rw-------

...which is required.

:warning: Make sure you have generated a valid *.key file (and a *.pub from the *.key first)!

2 Likes

I used ssh-keygen

new key.pub is in openwrt LuCi.
I tried again to login but does not work yet.

when you say

use the .key file to login

how you use it in terminal ?
thanks again for your time

ssh

Here are examples:

2 Likes

thanks guys, sorry for the problem

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.