By using Ssh-keygen to generate the public key, a new channel geek is established between the two machines.
Suppose the local machine is the client and the remote machine is the server.
1. Use Ssh-keygen to generate RSA keygen (this will overwrite the previously generated ~/.ssh/id_rsa files, please make a backup in advance.) )
Ssh-keygen-b 1024-t-rsa
Then press ENTER to continue.
2, copy the public key to the target machine, and renamed to Authorized_keys
SCP ~/.ssh/id_rsa.pub [Email protected]/home/root/.ssh/
Login to target machine (password required at this time)
Renamed the Id_rsa.pub to Authorized_keys.
3, after the completion of the copy, the normal landing once the target host.
4, after the exit to re-login, this time is not required SSH key can be landed on the target host.
The above is the general Linux Setup SSH key method, and OpenWrt uses dropbear as the service side, ~/.ssh/authorized_keys does not take effect. In fact, Dropbear's public key store file is a 600-permission/etc/dropbear/authorized_keys file, just add the public key to this file. As for the other, it is similar to sshd.
SSH key Login in OpenWrt (detailed steps)