Linux configuration without password login stand-alone and full distribution detailed tutorial

Linux configuration without password login stand-alone and full distribution detailed tutorial

1: Single machine password-free login configuration

1. Set the virtual machine host name

hostnamectl --static set-hostname hadoop001

The --static parameter means that hadoop001 is the host name of the virtual machine permanently.

2. Configure the mapping relationship between host name and IP address in the virtual machine

vi /etc/hosts

Add at the end of the file (the IP address can be viewed using the command ip addr)

192.168.17.131 hadoop001 

3. Turn off the firewall

systemctl stop firewalld.service
systemctl disable firewalld.service

4. Execute the following command:

 ssh-keygen -t rsa (After executing the command, just press the Enter key three times)
 cd ~/.ssh/
 ssh-copy-id -i id_rsa.pub root@hadoop001 

success! ! !

2: Fully distributed password-free login configuration

1. Set the host name of each virtual machine

hostnamectl --static set-hostname hadoop001 (master node)
hostnamectl --static set-hostname hadoop002 (from node 1)
hostnamectl --static set-hostname hadoop003 (from node 2)

The --static parameter means that hadoop001 is the host name of the virtual machine permanently.

2. Configure the mapping relationship between the host name and the IP address in the virtual machine (this operation must be performed on each machine)

vi /etc/hosts

Add at the end of the file (the IP address can be viewed using the command ip addr)

192.168.17.131 hadoop001
192.168.17.132 hadoop002
192.168.17.133 hadoop004 

3. Turn off the firewall (this needs to be done on every machine)

systemctl stop firewalld.service
systemctl disable firewalld.service

4. Execute the following command:

ssh-keygen -t rsa (After executing the command, just press the Enter key three times)
cd ~/.ssh/
ssh-copy-id -i id_rsa.pub root@hadoop001
ssh-copy-id -i id_rsa.pub root@hadoop002
ssh-copy-id -i id_rsa.pub root@hadoop003 

success! ! !

This is the end of this article about the detailed tutorial on Linux configuration of password-free login for stand-alone and full distribution. For more relevant Linux password-free login for stand-alone and full distribution content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Linux configuration SSH password-free login "ssh-keygen" basic usage
  • Configuring remote password-free login under Linux

<<:  Solution for mobile browsers not supporting position: fix

>>:  CSS3 to achieve timeline effects

Recommend

MySQL 8.0.20 installation and configuration detailed tutorial

This article shares with you a detailed tutorial ...

Detailed explanation of how to use eslint in vue

Table of contents 1. Description 2. Download rela...

Ten useful and simple MySQL functions

function 0. Display current time Command: select ...

Docker View the Mount Directory Operation of the Container

Only display Docker container mount directory inf...

WeChat applet uniapp realizes the left swipe to delete effect (complete code)

WeChat applet uniapp realizes the left swipe to d...

CSS3 click button circular progress tick effect implementation code

Table of contents 8. CSS3 click button circular p...

Docker implements container port binding local port

Today, I encountered a small problem that after s...

Implementation steps of vue-element-admin to build a backend management system

Recently, when I was working on a conference heal...

Vue-cli creates a project and analyzes the project structure

Table of contents 1. Enter a directory and create...

JavaScript implementation of the back to top button example

This article shares the specific code for JavaScr...

Implementation steps for installing java environment in docker

This article is based on Linux centos8 to install...

Five things a good user experience designer should do well (picture and text)

This article is translated from the blog Usability...

Introduction to Docker Architecture

Docker includes three basic concepts: Image: A Do...