如何运行在Web服务器上的Python脚本

如何运行在Web服务器上的Python脚本,第1张

expect -c "
set timeout 30;
spawn /usr/bin/ssh admin@$ServerB-IP
expect {
\"yes/no\" {send \"yes\r\"; exp_continue}
\"password\" {send \"xxx\r\";}
expect {
\"# \" {send \"tar zcvf ~/hellotargz hello\r\"}
\"$ \" {send \"tar zcvf ~/hellotargz hello\r\"}
}
interact"
这样试试


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zz/13150254.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2025-08-30
下一篇2025-08-30

发表评论

登录后才能评论

评论列表(0条)

    保存