当前位置:网站首页>分布式節點免密登錄
分布式節點免密登錄
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/
边栏推荐
- How to configure flymcu (STM32 serial port download software) is shown in super detail
- L2-001 紧急救援 (25 分)
- 报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks
- nodejs连接Mysql
- Software testing - interview question sharing
- DICOM: Overview
- [蓝桥杯2017初赛]包子凑数
- Number game
- 自动机器学习框架介绍与使用(flaml、h2o)
- AcWing 1294.樱花 题解
猜你喜欢

Why can't I use the @test annotation after introducing JUnit

Unable to call numpy in pycharm, with an error modulenotfounderror: no module named 'numpy‘

打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站

UDS learning notes on fault codes (0x19 and 0x14 services)

Picture coloring project - deoldify

Use dapr to shorten software development cycle and improve production efficiency

neo4j安装教程

QT creator custom build process

Neo4j installation tutorial

How to build a new project for keil5mdk (with super detailed drawings)
随机推荐
Learn winpwn (2) -- GS protection from scratch
L2-001 emergency rescue (25 points)
小L的试卷
Classes in C #
Niuke novice monthly race 40
库函数--(持续更新)
PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
Attention apply personal understanding to images
L2-007 family real estate (25 points)
Vs2019 first MFC Application
Install mongdb tutorial and redis tutorial under Windows
Django running error: error loading mysqldb module solution
ImportError: libmysqlclient. so. 20: Cannot open shared object file: no such file or directory solution
一键提取pdf中的表格
Introduction to the easy copy module
MySQL与c语言连接(vs2019版)
[MRCTF2020]套娃
Number game
How to set up voice recognition on the computer with shortcut keys