简体   繁体   English

如何使用Expect使用脚本进行远程部署

[英]How to use expect for remote deployment using script

I am trying to automate deployment on the remote server.After doing some investigation I came across two approaches: 我正在尝试自动化远程服务器上的部署。进行调查后,我遇到了两种方法:

1.Using expect 1.使用期望

2.Using sshpass 2.使用sshpass

I want to run a script file with deployment steps,without manually entering any password or any other input parameter required by my script from command line. 我想使用部署步骤来运行脚本文件,而无需从命令行手动输入脚本所需的任何密码或任何其他输入参数。 Please suggest me the right approach. 请建议我正确的方法。 I went through Ref1 and downloaded expect5.45.tar. 我通过Ref1并下载了Expect5.45.tar。 Can anyone please let me know what should I do next. 谁能让我知道下一步该怎么做。 I am not able to install as I don't have admin rights. 我没有管理员权限,因此无法安装。

Would Jenkins not suite this questions. 詹金斯会不会提出这个问题。 Jenkins will allow for script control as an environmental file as well as control over the remote host (via the publish over ssh plugin). Jenkins将允许脚本控制作为环境文件,以及对远程主机的控制(通过ssh插件发布)。 This would allow you to automated your process. 这将使您能够自动执行流程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM