当前位置:网站首页>The dolphin scheduler remotely executes shell scripts through the expect command

The dolphin scheduler remotely executes shell scripts through the expect command

2022-07-06 12:10:00 Zhun Xiaozhao

 Insert picture description here

#!/usr/bin/expect 
spawn ssh [email protected] -o "StrictHostKeyChecking no"
expect "password:"
send "[email protected]\r"
expect "#"
send "mkdir /tmp/testShell \r"
expect eof

notes : Installation may be required expect command , The general system comes with

原网站

版权声明
本文为[Zhun Xiaozhao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131601436270.html