当前位置:网站首页>分布式節點免密登錄
分布式節點免密登錄
2022-07-06 11:30:00 【@小蝸牛】
第一步:master節點
#在終端生成密鑰
ssh-keygen -t rsa
cd .ssh/
ls
#複制公鑰文件到authorized_keys文件
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ls -l

#authorized_keys文件的權限
[[email protected] .ssh]$ chmod 600 ~/.ssh/authorized_keys
#將專用密鑰添加到 ssh-agent 的高速緩存中
[[email protected] .ssh]$ ssh-add id_dsa
# 將authorized_keys文件複制到slave01、slave02節點zkpk用戶的根目錄
[[email protected] .ssh]$ scp ~/.ssh/authorized_keys [email protected]:~/
[[email protected] .ssh]$ scp ~/.ssh/authorized_keys [email protected]:~/
第二步:slave01節點
先從root用戶退回到普通用戶zkpk
#在終端生成密鑰
[[email protected] ~]$ ssh-keygen -t rsa
#將authorized_keys文件移動到.ssh目錄
shell [[email protected] ~]$ mv authorized_keys ~/.ssh/
第三步:slave02節點
先從root用戶退回到普通用戶zkpk
#在終端生成密鑰
[[email protected] ~]$ ssh-keygen -t rsa
#將authorized_keys文件移動到.ssh目錄
shell [[email protected] ~]$ mv authorized_keys ~/.ssh/
边栏推荐
- Project practice - background employee information management (add, delete, modify, check, login and exit)
- 2020网鼎杯_朱雀组_Web_nmap
- [蓝桥杯2017初赛]包子凑数
- Learn winpwn (2) -- GS protection from scratch
- AI benchmark V5 ranking
- 【Flink】CDH/CDP Flink on Yarn 日志配置
- Software I2C based on Hal Library
- Nanny level problem setting tutorial
- vs2019 桌面程序快速入门
- AcWing 1298. Solution to Cao Chong's pig raising problem
猜你喜欢

Error connecting to MySQL database: 2059 - authentication plugin 'caching_ sha2_ The solution of 'password'

Neo4j installation tutorial

【yarn】CDP集群 Yarn配置capacity调度器批量分配

wangeditor富文本引用、表格使用问题

快来走进JVM吧

Use dapr to shorten software development cycle and improve production efficiency

Double to int precision loss

人脸识别 face_recognition

Basic use of redis

error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_s instead
随机推荐
人脸识别 face_recognition
[Bluebridge cup 2021 preliminary] weight weighing
Database advanced learning notes -- SQL statement
Base de données Advanced Learning Notes - - SQL statements
Machine learning notes week02 convolutional neural network
Software testing and quality learning notes 3 -- white box testing
Reading BMP file with C language
QT creator custom build process
Summary of numpy installation problems
AcWing 1298. Solution to Cao Chong's pig raising problem
Case analysis of data inconsistency caused by Pt OSC table change
ES6 let 和 const 命令
基于apache-jena的知识问答
Learning question 1:127.0.0.1 refused our visit
Solution of deleting path variable by mistake
What does BSP mean
Valentine's Day flirting with girls to force a small way, one can learn
MTCNN人脸检测
引入了junit为什么还是用不了@Test注解
Codeforces Round #771 (Div. 2)