当前位置:网站首页>分布式节点免密登录
分布式节点免密登录
2022-07-06 09:15: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/
边栏推荐
- Machine learning notes week02 convolutional neural network
- 引入了junit为什么还是用不了@Test注解
- vs2019 第一个MFC应用程序
- Base de données Advanced Learning Notes - - SQL statements
- vs2019 使用向导生成一个MFC应用程序
- QT creator custom build process
- Library function -- (continuous update)
- 基于apache-jena的知识问答
- vs2019 桌面程序快速入门
- When you open the browser, you will also open mango TV, Tiktok and other websites outside the home page
猜你喜欢
Error connecting to MySQL database: 2059 - authentication plugin 'caching_ sha2_ The solution of 'password'
人脸识别 face_recognition
Picture coloring project - deoldify
[蓝桥杯2017初赛]方格分割
02 staff information management after the actual project
Rhcsa certification exam exercise (configured on the first host)
QT creator shape
Machine learning -- census data analysis
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
随机推荐
L2-006 树的遍历 (25 分)
Summary of numpy installation problems
wangeditor富文本引用、表格使用问题
Learn winpwn (3) -- sEH from scratch
Software testing - interview question sharing
Mtcnn face detection
ES6 let 和 const 命令
人脸识别 face_recognition
Codeforces Round #753 (Div. 3)
UDS learning notes on fault codes (0x19 and 0x14 services)
Request object and response object analysis
Integration test practice (1) theoretical basis
Niuke novice monthly race 40
TypeScript
MySQL与c语言连接(vs2019版)
Basic use of redis
Remember a company interview question: merge ordered arrays
AcWing 242. A simple integer problem (tree array + difference)
L2-001 紧急救援 (25 分)
Introduction and use of automatic machine learning framework (flaml, H2O)