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