I have a script which gets hanged while doing SSH from a Daemon , whereas it works perfectly while I run it from the terminal.
- Source Machine - redhat-rhel7.3-EUS-x86_64
- Remote Machine - Solaris 11.4
ssh XXXXXX << EOF
echo "Start executing script" >>/app/temp.log
/app/script.ksh 1 2 >> /app/temp.log
echo "finish executing script" >>/app/temp.log
exit 0
EOF
echo "Final execution completed">>/app/temp.log
- RUN 1 - From terminal (User X) , the script get completed and there will be no process running
- RUN 2 - From Daemon(Running on User X) , the script stuck at EOF I believe , as I can see log file has "finish executing script" , and I can see process running
What should I do to make script work?
PS - script.ksh exists in the remote server