当前位置:网站首页>SSH automatic reconnection script
SSH automatic reconnection script
2022-07-31 05:59:00 【tcliuwenwen】
Blog Background
Realize the automatic reconnection of SSH. For example, if the machine is booting or the network speed is slow, you can keep trying until the connection is successful.
Detailed operation
index=0;for ((i=1;i<=10;i++));do sshpass -p xxxxxxx ssh -o PreferredAuthentications=password -o StrictHostKeyChecking=no-o ConnectTimeout=3 [email protected] 'echo';if [[ $? -eq 0 ]];thenindex=1;break;fi;done;if [[ "$index" -eq 1 ]];then sshpass -p xxxxxxx ssh -o PreferredAuthentications=password -o StrictHostKeyChecking=no-o ConnectTimeout=3 [email protected];fi
边栏推荐
- Why is the redis single-threaded also so fast?
- cocos2d-x-3.2图片灰化效果
- First acquaintance with Flask
- Regular Expression Basics
- Why does read in bash need to cooperate with while to read the contents of /dev/stdin
- 腾讯云轻量服务器删除所有防火墙规则
- cocos2d-x-3.x 修改和纪录
- 【Elastic-Job源码分析】——作业监听器
- MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
- quick-3.5 lua调用c++
猜你喜欢
【Elastic-Job源码分析】——作业监听器
mysql password modification method in Linux (pro-test available)
【云原生】微服务Nacos的简单介绍与使用
flutter arr 依赖
通信原理——纠错编码 | 汉明码(海明码)手算详解
Install mysqldb in mac10.14
Linux中mysql密码修改方法(亲测可用)
[windows]--- SQL Server 2008 super detailed installation tutorial
【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
2021美赛C题M奖思路
随机推荐
[Cloud native] Open source data analysis SPL easily copes with T+0
360 加固 file path not exists.
Access database query
Build vulhub vulnerability shooting range on kali
sql add default constraint
js中流程控制语句
最新MySql安装教学,非常详细
Artifact SSMwar exploded Error deploying artifact.See server log for details
MySQL高级语句(一)
场效应管 | N-mos内部结构详解
Linux修改MySQL数据库密码
sql 外键约束【表关系绑定】
Detailed explanation of pointers in C language
quick-3.5 无法正常显示有混合纹理的csb文件
UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
Filter out egrep itself when using ps | egrep
Common JVM interview questions and answers
SQLite 查询表中每天插入的数量
【Elastic-Job】分布式调度任务概览篇
【云原生】微服务Nacos的简单介绍与使用