Time for action – setting up SSH
Carry out the following steps to set up SSH:
Create a new OpenSSL key pair with the following commands:
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/hadoop/.ssh/id_rsa): Created directory '/home/hadoop/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/hadoop/.ssh/id_rsa. Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub. …
Copy the new public key to the list of authorized keys by using the following command:
$ cp .ssh/id _rsa.pub .ssh/authorized_keys
Connect to the local host.
$ ssh localhost The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is b6:0c:bd:57:32:b6:66:7c:33:7b:62:92:61:fd:ca:2a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
Confirm that the password-less SSH is working.
$ ssh localhost...