The path to open-source wrt ac wireless routing-5

Source: Internet
Author: User
Tags free ssh

-Set a password-free SSH connection on Mac

1. generate an SSH key pair

<pre name="code" class="html">ssh-keygen -t rsa -b 1024 -C "$(whoami)@$(hostname),$(date '+%F %T')" -f ~/.ssh/tomato

Or simply: 

ssh-keygen -t rsa -f ~/.ssh/tomato

It will ask passphrase. It is best to set a secret for security reasons. If not, press enter to continue.

Then it generates two key pair files: Tomato and tomato. Pub.

Copy the content in tomato. Pub, or run the following command to copy it to the clipboard.

LC_CTYPE=UTF-8 pbcopy <~/.ssh/tomato.pub

2. Go to the management interface of tomato: Administration-> Admin Access-> authorized keys

Paste it into authorized keys:



If there are more than one, you can paste it below and save it.


3. Set which key file to use on Mac.

Edit/generate new ~ /. Ssh/config file, write content:

Host 192.168.1.1  IdentityFile ~/.ssh/tomato  User root
Or run the following command:

cat <<EOF >> ~/.ssh/configHost 192.168.1.1  IdentityFile /Users/toliu/.ssh/tomato  User rootEOF

Replace 192.168.1.1 with your unlimited route address.


4. Set the correct user and permissions. After 10.81, if the permission is incorrect with the user, it will not be connected successfully:

chmod 400 ~/.ssh/tomato;chmod 700 ~/.ssh/


5. Try: SSH 192.168.1.1


Ouba



The path to open-source wrt ac wireless routing-5

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.