CentOS6.5 SSH Key Login detailed

Source: Internet
Author: User
Tags ssh
one, the need for key login

In general, the key login ssh is more secure than the account password login, and sometimes the company needs to configure the server login for the new colleague, typically by configuring the key login directly. second, SSH key login step 1, the key generation

There are generally many ways to generate keys. Here, we use Ssh-genkey on the positive server to generate the key, using the Puttygen of the client to convert the method.

The following figure:


Where-T is the means of encryption. Then modify the public key name to Authorized_keys.

Also, make sure that the. SSH directory has permissions of 600, if it is not, use chmod ssh to set it up. The main purpose is to prevent others from placing a public key under. SSH, you can log in without password.

Then, use the PSCP to load the private key into the native, and convert it with Puttygen. 2, login settings

As shown in the figure:



3, after the successful login as shown


Iii. Frequently asked questions. Question one: server refused our key.

Cause: If you look at the log, you know. The SSH context is not secure and is intercepted by SELinux.

Solution: RESTORECON-RV. SSH, login after successful execution. problem two: Only root user can log in, other users can not log in.

Cause analysis: Generally because it is not set in the appropriate directory. SSH

Solution:/root/.ssh/This directory is set to the root account public key. The corresponding user A, to the/HOME/A/.SSH under the same settings as root.

After the success of the following figure:


Affirm: This article original, if reprint please indicate the original address.

http://blog.csdn.net/q229827701/article/details/41683959

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.