I was wondering how to kill a running script in this situation: Two machines; machine1 and machine2. machine1 writes: ssh machine2 << 'ENDSSH' ./script.sh ENDSSH causing the script to be run on machine2.
Is there a quick way from machine2, to kill the running script? Perhaps a kill all background jobs command or something?
Ok after reading about I have noticed something. I always get this message after the ssh stuff. Pseudo-terminal will not be allocated because stdin is not a terminal. Here the job is not allocated to a terminal and this can be seen where the ps command and job command do not reveal that a script is running. How can I allocate a tie to the currently running terminal? Thanks