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

Notes on configuring multiple proxies using vue projects

In the development process of Vue project, for th...

MySQL index for beginners

Preface Since the most important data structure i...

Two methods to disable form controls in HTML: readonly and disabled

In the process of making web pages, we often use f...

Detailed explanation of the command mode in Javascript practice

Table of contents definition structure Examples C...

Analysis of Context application scenarios in React

Context definition and purpose Context provides a...

25 Vue Tips You Must Know

Table of contents 1. Limit props to type lists 2....

Implementation of deploying Apollo configuration center using docker in CentOS7

Apollo open source address: https://github.com/ct...

Detailed usage of docker-maven-plugin

Table of contents Docker-Maven-Plugin Maven plugi...

Summary of web design experience and skills

■ Website theme planning Be careful not to make yo...

Detailed steps to install RabbitMQ in docker

Table of contents 1. Find the mirror 2. Download ...

Analysis of the principle of using PDO to prevent SQL injection

Preface This article uses pdo's preprocessing...

W3C Tutorial (8): W3C XML Schema Activities

XML Schema is an XML-based alternative to DTD. XM...