0
我想ssh到我的部署服务器使用詹金斯建立服务器,但它给错误运行一个脚本在Ubuntu上运行远程脚本:无法使用詹金斯
Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/test/workspace
[workspace] $ /bin/sh -xe /tmp/hudson2847284723784326.sh
+ ssh [email protected]
Pseudo-terminal will not be allocated because stdin is not a terminal.
Host key verification failed.
Build step 'Execute shell' marked build as failure
Finished: FAILURE
我使用执行shell构建工具中詹金斯。使用步骤如下:
- SSH用户@服务器IP
- CD pathofscript
- ./script.sh
我可以在服务器手动登录,而无需使用密码。我用这篇文章来设置密码减少登录:http://www.linuxproblem.org/art_9.html
请让我知道我做错了什么。
我想你需要发送命令到远程服务器就像在这里http://stackoverflow.com/questions/4412238/whats-the-cleanest-way-to-ssh-and-run-multiple-commands-在-庆典 – KeepCalmAndCarryOn
我试图 SSH用户@服务器IP /path/test.sh 并通过我的构建机器的工作,但是当我试图与詹金斯一样,它说: 主机密钥验证失败。 我的建造者与詹金斯不同。我是否也需要为Jenkins生成ssh密钥? –
我这么认为,如果你有root权限,那么你可以'su - jenkins'并生成密钥 – KeepCalmAndCarryOn