MAC OS x system generates SSH public private key

Source: Internet
Author: User
Tags file permissions
1. Using the Ssh-keygen tool to generate a public private key

SSH-KEYGEN-T rsa-b 1024

Enter the password as prompted, and a public private key is generated.

2. Add the public key to the remote server

For example,/users/apple/.ssh/id_rsa and/users/apple/.ssh/ are generated.

Note Backup

Id_rsa is the private key, is the public key

Add the public key content to the remote server, as added, one line at a public key. (for Root account)


650) this.width=650; "Title=" Image (Ten) "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" Image (Ten) "Src=" Wkiol1zsy8vy60t8aabq5qzokjm648.png "" 704 "height=" "/>

3. Login Server

Using ssh-i/users/apple/.ssh/id_rsa [email protected] Remote IP

4, remote server non-root account login processing

If you log on to a remote server and use a non-root account, you will also need to modify the directory and file permissions under the remote root account.

chmod 700/home/non-root account/.ssh/

chmod 644/home/non-root account/.ssh/authorized_keys

MAC OS x system generates SSH public private key

Related Article

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: 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.