当前位置:网站首页>自动化配置SSH免密登录和取消SSH免密配置脚本
自动化配置SSH免密登录和取消SSH免密配置脚本
2022-07-27 13:26:00 【51CTO】
1. 前文
搭建了一套有多台主机的局域网环境,不完全考虑安全性的情况下,为方便管理局域网内主机,配置SSH免密登录,因主机较多,前阵子针对配置ssh免密和取消ssh免密功能单独写了脚本来自动化批量部署,现把两个功能封装在一起做成交互式程序
2.实现代码
3. 使用方法
3.1 使用前准备
- 将代码复制到脚本文件,赋予执行权限
- 提前准备好IP地址用户密码文件
3.2 IP地址用户密码文件格式(注意!!!)

3.3 运行脚本

4. 使用注意
4.1 IP地址用户密码文件格式请按照以上图示标准填写,内容不正确时会出现等待ssh登录或者重试的结果,这时候需要检查配置文件的用户名或者密码是否错误

4.2 未在配置ssh免密的情况使用脚本,需要多次ctrl+c强制退出脚本

代码干货分享,如果你有不一样的想法,欢迎一起交流学习~
边栏推荐
- This points to problems, closures, and recursion
- 正掩码、反掩码、通配符
- 网上券商APP开户安全有保障吗?
- Photo album based on gec6818 development board
- Unity2d -- camera follow
- JS什么是声明提前?函数与变量声明提前的先后顺序(执行上下文铺垫篇)
- Slam overview Reading Note 6: slam research based on image semantics: application-oriented solutions for autonomous navigation of mobile robots 2020
- va_ List usage summary
- Leetcode · daily question · 592. fraction addition and subtraction · simulation
- 巨形象的图解 SQL
猜你喜欢

Vscode -- create template file

this指向问题,闭包以及递归

知识关联视角下金融证券知识图谱构建与相关股票发现

Weice biological IPO meeting: annual revenue of 1.26 billion Ruihong investment and Yaohe medicine are shareholders

How to view revenue and expenditure by bookkeeping software

Pure C handwriting thread pool

基于预训练模型的多标签专利分类研究

Rtl8762dk environment construction (I)

One of yolox improvements: add CBAM, Se, ECA attention mechanism

Excellent basic methods of URL parsing using C language
随机推荐
一篇文章看懂JS执行上下文
正向代理与反向代理
Annual comprehensive analysis of China's online video market in 2022
log4j2 jdbc appender
Mining enterprise association based on Enterprise Knowledge Map
Thread knowledge summary
连接ResourceManager 失败
watch VS watchEffect
Understand JS execution context in an article
C language layered understanding (C language array)
文旅数藏 | 用艺术的方式游云南
Pure C handwriting thread pool
SLAM综述阅读笔记四:A Survey on Deep Learning for Localization and Mapping: Towards the Age of Spatial 2020
Excellent basic methods of URL parsing using C language
poj3461 Oulipo【KMP】
Positive mask, negative mask, wildcard
Chapter 3 business function development (view clue details)
poj3461 Oulipo【KMP】
How to deploy open source Siyuan privately
[intensive reading of papers] grounded language image pre training (glip)