-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