私は、シェルスクリプトを実行することで、jenkinsサーバから/tmp/san.txt内のこれらのサーバに対するパスワードの少ない認証を持つサーバに対してsshを実行しています。ジェンキンス| sshが動作しない
[email protected]:/tmp> cat check.sh
#!/bin/bash
for i in `cat /tmp/sand.txt`
do
ssh -q [email protected]"$i"
bash /app/home/mpdevops/sand.sh
done
[email protected]:/tmp> bash check.sh
Last login: Wed Apr 19 09:20:03 2017 from 10.4.70.42
Powered by Monsoon (Version 2.2.1519) Platform: suse 11.3
Hostname : mo-97df9aafa.dc19.saas.sap.cor Name : PC19MOBDEVOPS01
Organization : saas_prod Project : dc19_production
Url : https://monsoon.mo.sap.corp/instances/mo-97df9aafa
mo-97df9aafa[PC19MOBDEVOPS01]:~ # logout
bash: /app/home/mpdevops/sand.sh: No such file or directory
しかし、sand.shが存在します。
mo-97df9aafa[PC19MOBDEVOPS01]:~ # cat sand.sh
for j in `cat sand.txt`
do
ssh -q [email protected]"$j"
sudo python /tmp/test.py
done
助けてください。
私はそれを考え出しました。私はEOFを使わなければならなかった。 – Sandesh