쉘 스크립트를 실행하여 젠킨스 서버에서 /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