当前位置:网站首页>分布式节点免密登录
分布式节点免密登录
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/
边栏推荐
- How to set up voice recognition on the computer with shortcut keys
- Kept VRRP script, preemptive delay, VIP unicast details
- vs2019 桌面程序快速入门
- Windows下安装MongDB教程、Redis教程
- L2-004 is this a binary search tree? (25 points)
- In the era of DFI dividends, can TGP become a new benchmark for future DFI?
- Introduction and use of automatic machine learning framework (flaml, H2O)
- Number game
- Neo4j installation tutorial
- PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
猜你喜欢
自动机器学习框架介绍与使用(flaml、h2o)
UDS learning notes on fault codes (0x19 and 0x14 services)
机器学习--人口普查数据分析
Neo4j installation tutorial
{一周总结}带你走进js知识的海洋
Knowledge Q & A based on Apache Jena
引入了junit为什么还是用不了@Test注解
QT creator runs the Valgrind tool on external applications
解决安装Failed building wheel for pillow
Pytorch基础
随机推荐
Rhcsa certification exam exercise (configured on the first host)
天梯赛练习集题解LV1(all)
Error connecting to MySQL database: 2059 - authentication plugin 'caching_ sha2_ The solution of 'password'
[蓝桥杯2017初赛]包子凑数
常用正则表达式整理
AcWing 179. Factorial decomposition problem solution
[AGC009D]Uninity
TCP/IP协议(UDP)
Valentine's Day flirting with girls to force a small way, one can learn
Project practice - background employee information management (add, delete, modify, check, login and exit)
Vs2019 first MFC Application
Software testing and quality learning notes 3 -- white box testing
PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
误删Path变量解决
Introduction to the easy copy module
基于apache-jena的知识问答
Codeforces Round #771 (Div. 2)
QT creator specifies dependencies
ImportError: libmysqlclient. so. 20: Cannot open shared object file: no such file or directory solution
DICOM: Overview