Tutorial on implementing SSH password-free login for virtual machines in Ubuntu14.04, ubuntu14.04ssh
SSH, short for Secure Shell, is developed by the Network Working Group of IETF. SSH is a security protocol based on the application layer. SSH is a reliable protocol designed for remote logon sessions and other network services. The SSH protocol can effectively prevent information leakage during Remote Management. SSH was originally a program on a UNIX system and then quickly extended to other operating platforms. SSH can compensate for Network Vulnerabilities when used correctly. The SSH client is applicable to multiple platforms. Almost all UNIX platforms-including HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix, and other platforms-can run SSH. Next I will briefly introduce how to implement ssh password-free login for three virtual machines:
Host:
192.168.0.33 master
192.168.0.34 hadoop2
192.168.0.35 hadoop3
Step 1: Install ssh and run the following commands on the three virtual machines to install SSH:
Sudo apt-get install openssh-server
Step 2: generate the public key and private key, and execute the following command on the three virtual machines respectively:
Ssh-keygen
Step 3: On the master host, enter the. ssh directory and append the public key to the authorized_keys file:
Step 4: copy the authorized_keys file to the hadoop2 host on the master Host:
Step 5: append the public key on hadoop2 to the authorized_keys file:
Step 6: copy the authorized_keys file on hadoop2 to the hadoop3 Host:
Step 6: append the public key to the authorized_keys file on hadoop3, copy the authorized_keys file on hadoop3 to the master and hadoop2 hosts, and restart the ssh service to complete the configuration.