当前位置:网站首页>分布式節點免密登錄
分布式節點免密登錄
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/
边栏推荐
- double转int精度丢失问题
- 【kerberos】深入理解kerberos票据生命周期
- What does BSP mean
- 【yarn】Yarn container 日志清理
- QT creator custom build process
- Ansible practical series I_ introduction
- [蓝桥杯2021初赛] 砝码称重
- Error connecting to MySQL database: 2059 - authentication plugin 'caching_ sha2_ The solution of 'password'
- AcWing 242. A simple integer problem (tree array + difference)
- Vs2019 desktop app quick start
猜你喜欢
AcWing 1298. Solution to Cao Chong's pig raising problem
vs2019 使用向导生成一个MFC应用程序
Pytorch基础
PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
[蓝桥杯2017初赛]方格分割
wangeditor富文本引用、表格使用问题
Case analysis of data inconsistency caused by Pt OSC table change
Django running error: error loading mysqldb module solution
Integration test practice (1) theoretical basis
随机推荐
L2-004 这是二叉搜索树吗? (25 分)
学习问题1:127.0.0.1拒绝了我们的访问
Request object and response object analysis
L2-004 is this a binary search tree? (25 points)
Tcp/ip protocol (UDP)
[蓝桥杯2021初赛] 砝码称重
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
L2-007 家庭房产 (25 分)
Vs2019 first MFC Application
Antlr4 uses keywords as identifiers
QT creator create button
误删Path变量解决
Record a problem of raspberry pie DNS resolution failure
Unable to call numpy in pycharm, with an error modulenotfounderror: no module named 'numpy‘
Julia 1.6 1.7 common problem solving
2020网鼎杯_朱雀组_Web_nmap
error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_s instead
nodejs 详解
[Blue Bridge Cup 2017 preliminary] buns make up
Introduction and use of automatic machine learning framework (flaml, H2O)