标签:root ash check xxxx bash pass host elk ssh
sshpass连接主机以及执行命令
[root@hk-elk-elastic1 ~]# cat /root/ssh.sh #!/bin/bash ip=10.20.11.$1 pass="xxxx" sshpass -p "$pass" ssh root@$ip -o StrictHostKeyChecking=no $2 #sshpass -p "$pass" ssh root@$ip $2
标签:root ash check xxxx bash pass host elk ssh
原文地址:https://www.cnblogs.com/jcici/p/9882986.html