当前位置:网站首页>分布式節點免密登錄
分布式節點免密登錄
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/
边栏推荐
- Software testing and quality learning notes 3 -- white box testing
- [NPUCTF2020]ReadlezPHP
- 【CDH】CDH/CDP 环境修改 cloudera manager默认端口7180
- QT creator support platform
- Install mongdb tutorial and redis tutorial under Windows
- Integration test practice (1) theoretical basis
- 人脸识别 face_recognition
- nodejs 详解
- [蓝桥杯2017初赛]包子凑数
- In the era of DFI dividends, can TGP become a new benchmark for future DFI?
猜你喜欢
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
Vs2019 first MFC Application
QT creator create button
Valentine's Day flirting with girls to force a small way, one can learn
Use dapr to shorten software development cycle and improve production efficiency
AcWing 1298.曹冲养猪 题解
Learn winpwn (2) -- GS protection from scratch
PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
Reading BMP file with C language
Error connecting to MySQL database: 2059 - authentication plugin 'caching_ sha2_ The solution of 'password'
随机推荐
MySQL与c语言连接(vs2019版)
AcWing 1294.樱花 题解
Ansible practical series I_ introduction
Learn winpwn (2) -- GS protection from scratch
When using lambda to pass parameters in a loop, the parameters are always the same value
Case analysis of data inconsistency caused by Pt OSC table change
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
Heating data in data lake?
L2-007 family real estate (25 points)
About string immutability
[Blue Bridge Cup 2017 preliminary] buns make up
vs2019 桌面程序快速入门
误删Path变量解决
[BSidesCF_2020]Had_a_bad_day
QT creator create button
ES6 Promise 对象
Basic use of redis
jS数组+数组方法重构
Knowledge Q & A based on Apache Jena
自动机器学习框架介绍与使用(flaml、h2o)