当前位置:网站首页>分布式節點免密登錄
分布式節點免密登錄
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/
边栏推荐
- Ansible practical series I_ introduction
- QT creator specifies dependencies
- [Blue Bridge Cup 2017 preliminary] grid division
- 自动机器学习框架介绍与使用(flaml、h2o)
- 机器学习--人口普查数据分析
- SQL时间注入
- error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_ s instead
- Unable to call numpy in pycharm, with an error modulenotfounderror: no module named 'numpy‘
- 【kerberos】深入理解kerberos票据生命周期
- What does usart1 mean
猜你喜欢
QT creator runs the Valgrind tool on external applications
Learning question 1:127.0.0.1 refused our visit
Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path
AcWing 1298. Solution to Cao Chong's pig raising problem
机器学习--人口普查数据分析
AcWing 1298.曹冲养猪 题解
【yarn】CDP集群 Yarn配置capacity调度器批量分配
One click extraction of tables in PDF
Double to int precision loss
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
随机推荐
天梯赛练习集题解LV1(all)
L2-006 树的遍历 (25 分)
AcWing 1298. Solution to Cao Chong's pig raising problem
DICOM: Overview
When using lambda to pass parameters in a loop, the parameters are always the same value
ES6 let 和 const 命令
2019腾讯暑期实习生正式笔试
How to set up voice recognition on the computer with shortcut keys
Database advanced learning notes -- SQL statement
Why can't I use the @test annotation after introducing JUnit
{一周总结}带你走进js知识的海洋
学习问题1:127.0.0.1拒绝了我们的访问
Deoldify project problem - omp:error 15:initializing libiomp5md dll,but found libiomp5md. dll already initialized.
QT creator support platform
[BSidesCF_2020]Had_a_bad_day
About string immutability
SQL时间注入
MySQL与c语言连接(vs2019版)
Neo4j installation tutorial
Nanny level problem setting tutorial