Linux2 Configuring SSH on Linux (CentOS) for free login

Source: Internet
Author: User
Tags root access

Objective:

The main article is that I need to configure SSH to be free to login before installing Hadoop. Through the online search, found a lot of similar information, but how many small problems, so combined with their own practice, recorded in this, as a reference. If you can help others, nature is better.

============================================================ Long split-line ============================================= ========================

Body:

All of the following actions are under root permissions, my system is centos6.x, the first is to install SSH, the network has a lot of installation methods, I use: sudo apt-get install SSH. Follow the prompts to complete the installation, this is relatively simple, and more complex is the following configuration, in detail as follows:

1. Confirm the native sshd configuration file (requires root permission), execute the following command:

(1) Open file: $ vi/etc/ssh/sshd_config

(2) Find the following and remove the comment "#"

Rsaauthentication Yes

Pubkeyauthentication Yes

Authorizedkeysfile. Ssh/authorized_keys

2. If you modify the configuration file, you need to restart the sshd service (requires root access)

$ Service sshd Restart

3. Execute the TEST command:

$ ssh localhost

You will still be prompted to enter the password, because we have not generated a certificate at this time, so we need to generate a certificate

4. To generate the certificate Public private key step, execute the following command sequentially:

$ ssh-keygen-t Dsa-p "-F ~/.SSH/ID_DSA

$CD. SSH

$cat id_dsa.pub >> Authorized_keys

5. Test login ssh localhost:

$ ssh localhost

Under normal circumstances will log on successfully, showing some successful login information.

Linux2 Configuring SSH on Linux (CentOS) for free login

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