SSH configuration Client-free key to server

Source: Internet
Author: User

All operations are OK on the client side.

The general idea is as follows: On the client side, generate a public-private key pair that uploads the public key to the ~/.ssh/of the specified user on the server (for example, a)

Modify the next file, the directory permissions are OK, so you can from the client to the server to exempt the key,

If you still want to serve, the client is exempt from the key, and in turn, it can.


For example, client clients want to exempt the key to server-side user A

Client ip:192.168.200.157

Server ip:192.168.200.156

1.ssh-keygen//Generate public and private keys, press the ENTER key all the way.

The generated. SSH directory permission requirements are: 700

The. Ssh/id_rsa (private key) permission requirement is: 600, user and user group requirements for the client's own

The. ssh/id_rsa.pub (public key) permission requirement is: 644, user and user group requirements for the client's own


2.SCP ~/.ssh/id_rsa.pub [Email protected]:~/authorized_keys (Transfer the public key to the server, named Authorized_keys)

Enter the password for a

SSH [email protected]//a user who is connected remotely to the server.

Enter the password for a

mkdir. SSH && chmod. ssh

CP ~/authorized_keys. ssh/

cd. SSH && chmod 644 Authorized_keys

Authorized_keys users and user groups to be a



At this point, the client connects to server user A without entering a password.


This article is from the "12208412" blog, please be sure to keep this source http://12218412.blog.51cto.com/12208412/1872020

SSH configuration Client-free key to server

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.