Ubuntu has an SSH client installed by default, and you need to install SSH server:
sudo apt-get install Openssh-server
After installation, you can use the following command to log on to the machine:
SSH localhost
At this point, you will be prompted with the following (SSH first login hint), enter Yes. Then follow the prompts to enter the password Hadoop, so it landed on the machine.
But this login is required to enter the password every time, we need to configure SSH without password login more convenient.
First exit the SSH just now, go back to our original terminal window, then use Ssh-keygen to generate the key and add the key to the authorization:
exit # quit SSH localhost ~/.ssh/ # If you do not have the directory, first ssh localhost ssh-keygen-t RSA # will be prompted, press ENTER to be able to cat. /id_rsa.pub >>./authorized_keys # Join license
At this point ssh localhost
, the command, without entering the password can be directly logged in
9. How to make Ubuntu ssh password-free login