I am having a problem working with SSH in Unix to run a script on a remote machine. The script is meant to run infinitely until an event happens, in which case it will then break out of its loop. Unfortunatly it seems that after a short peroid of afew secounds the script stops running. I believe this is related to SSH as the script when ran localy works as intended.
Is there a way I could trigger my remote machine to run that script as if it was being ran locally, so that I could close the SSH conneciton and it would still be running?
The script that calls the script located on the remote machine is this.:
#!/usr/bin/expect set add [lindex $argv 0] set add2 [lindex $argv 1]
spawn ssh -l root2 ${add} /home/jason/localCopy/selfMonitor &
expect *assword: send "BIGMASSIVESECRET\r"
expect "]$ "
Contained in the selfMonitor script is basically a do while true statement that will run forever until broken.
Any help is appreciated, thanks.