SSH is required when installing Hadoop, so record this process
It is recommended to install OpenSSH, and Hadoop needs to start the daemon of each host in the Slave list via ssh, so ssh is required to be installed. Although we are now building a pseudo-distributed platform, but Hadoop does not have a separate cluster and pseudo-distributed, for Pseudo-distributed, Hadoop will be the same as the cluster processing, that is, in order to start the file conf/slaves recorded in the host process, but in the pseudo-distributed Salve is localhost only, so for pseudo-distributed, SSH is required.
1 Install SSH, if installed on the machine, skip to see if SSH is installed
Ps-e | grep SSH
If you do not see SSH, the instructions are not installed and need to be installed
sudo apt-get install Openssh-server
Installation complete, start, stop, restart command as follows
Sudo/etc/init.d/ssh start
Sudo/etc/init.d/ssh stop
Sudo/etc/init.d/ssh restart
2 Configuring password-free logon native
Switch to root user
sudo su
In the home directory, execute the following command: ssh-keygen-t RSA
Generating public/private RSA key pair.Enter file in which to save the key (/HOME/LIUCC/.SSH/ID_RSA):Enter Passphrase (empty for NoPassphrase):Enter same Passphrase again:Your identification have been saved in/home/liucc/.ssh/id_rsa.Your Public key have been saved in/home/liucc/.ssh/id_rsa.pub.The key fingerprint is:2f: aa: -: to: the: *: a6:5c:b3:e9:fc:b3:d0:0d: -: C8 LIUCC@ubuntuThe key's Randomart image is:+--[RSA 2048]----+| o* | | . o= * | | O.E. . || . o O | | . O. S | | . o O. || .. + O. || . .. + . || O.. o |+-----------------+
After this command is completed, the ID_DSA and id_dsa.pub two files are created under the. SSH folder under the current folder, which is a pair of SSH private keys and public keys, append the id_dsa.pub (public key) to the authorized key, and enter the following command if there is no Id_r found Sa.pub error, need to enter into the. SSH directory below
Cat id_rsa.pub > Authorized_keys
Input command test
Ssh
Ubuntu 14.10 under SSH configuration