当前位置:网站首页>分布式節點免密登錄
分布式節點免密登錄
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/
边栏推荐
- 快来走进JVM吧
- Vs2019 use wizard to generate an MFC Application
- 基于apache-jena的知识问答
- AcWing 179.阶乘分解 题解
- Database advanced learning notes -- SQL statement
- AcWing 1294. Cherry Blossom explanation
- 【yarn】Yarn container 日志清理
- How to set up voice recognition on the computer with shortcut keys
- 數據庫高級學習筆記--SQL語句
- In the era of DFI dividends, can TGP become a new benchmark for future DFI?
猜你喜欢
neo4j安装教程
Error connecting to MySQL database: 2059 - authentication plugin 'caching_ sha2_ The solution of 'password'
MySQL与c语言连接(vs2019版)
Introduction and use of automatic machine learning framework (flaml, H2O)
Windows下安装MongDB教程、Redis教程
Machine learning -- census data analysis
Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path
Learning question 1:127.0.0.1 refused our visit
[Blue Bridge Cup 2017 preliminary] grid division
02 staff information management after the actual project
随机推荐
vs2019 使用向导生成一个MFC应用程序
MySQL与c语言连接(vs2019版)
Why can't I use the @test annotation after introducing JUnit
[Blue Bridge Cup 2017 preliminary] grid division
Learning question 1:127.0.0.1 refused our visit
yarn安装与使用
ES6 Promise 对象
Attention apply personal understanding to images
{one week summary} take you into the ocean of JS knowledge
[AGC009D]Uninity
error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_ s instead
解决安装Failed building wheel for pillow
DICOM: Overview
ES6 let 和 const 命令
Introduction to the easy copy module
人脸识别 face_recognition
搞笑漫画:程序员的逻辑
One click extraction of tables in PDF
Codeforces Round #753 (Div. 3)
Record a problem of raspberry pie DNS resolution failure