当前位置:网站首页>分布式节点免密登录
分布式节点免密登录
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/
边栏推荐
- [BSidesCF_2020]Had_a_bad_day
- L2-007 family real estate (25 points)
- Use dapr to shorten software development cycle and improve production efficiency
- Tcp/ip protocol (UDP)
- Aborted connection 1055898 to db:
- Case analysis of data inconsistency caused by Pt OSC table change
- How to build a new project for keil5mdk (with super detailed drawings)
- QT creator specifies dependencies
- 快来走进JVM吧
- Record a problem of raspberry pie DNS resolution failure
猜你喜欢

快来走进JVM吧

QT creator create button

Valentine's Day flirting with girls to force a small way, one can learn

安装numpy问题总结

PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt

一键提取pdf中的表格

Software testing and quality learning notes 3 -- white box testing

MTCNN人脸检测

Solve the problem of installing failed building wheel for pilot

AcWing 242. A simple integer problem (tree array + difference)
随机推荐
Did you forget to register or load this tag
Vs2019 use wizard to generate an MFC Application
Heating data in data lake?
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
Learn winpwn (3) -- sEH from scratch
库函数--(持续更新)
When you open the browser, you will also open mango TV, Tiktok and other websites outside the home page
error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_s instead
Kept VRRP script, preemptive delay, VIP unicast details
Punctual atom stm32f103zet6 download serial port pin
[蓝桥杯2021初赛] 砝码称重
安全测试涉及的测试对象
Niuke novice monthly race 40
学习问题1:127.0.0.1拒绝了我们的访问
Vs2019 desktop app quick start
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
【kerberos】深入理解kerberos票据生命周期
ES6 Promise 对象
How to build a new project for keil5mdk (with super detailed drawings)
基于apache-jena的知识问答