Shell脚本实现自动登录服务器
1.登录脚本
login_server.sh
#!/bin/bash# ReferenceLink:https://yq.aliyun.com/articles/516347#show all host infos of serverList.txtif [[ -f ./serverList.txt ]]
thenhostNumcat ./serverList.txt | wc -l
elseecho "No .serverList.txt in ./ dir, pl…
2026/8/9 16:56:30