SSH Password-free login settings under Mac

Source: Internet
Author: User
Tags free ssh

Since Mac OS is very similar to UNIX-based operating system terminals and Linux, it is not possible to remotely log on to a Linux server without the use of Windows-like putty and CRT tools, requiring a simple 3-step password-free SSH remote.

1: Generate the key. Under Mac Terminal, execute the following command:
SSH-KEYGEN-T RSA
The default is to press ENTER on the line, do not have to make other changes, after execution will generate two files, a public key, a private key.
LS ~/.ssh
#id_rsa (private key) id_rsa.pub (public key)

2: Place the public key to the server that needs to be remote.
SCP ~/.ssh/id_rsa.pub User @:/home/user/.ssh/, or can be copied to/root/.ssh

3: Log on to the remote server
CD ~/.ssh
CAT/user root/.ssh/id_rsa.pub >> authorized_keys #将公钥内容加入到authorized_keys文件, no, just create one.

4: Change the Authorized_keys permissions

chmod Authorized_keys

----------------------------------------

You can also generate a pair of keys on the remote server, add the public key content to the Authorized_keys file and change the permissions, copy the private key to the terminal that requires the remote server

SSH Password-free login settings under Mac

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.