SSH key Login in OpenWrt (detailed steps)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.