Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: bakedjake
I realize there are tools like RSTunnel and autossh, but I'm wondering how one goes about determining, via a script, if a session/process is still running.
I have a feeling that there is more to this, but I've definitely made some progress.
Here is what I have thus far (comments/suggestions welcome):
if ps aux ¦ grep [y]ourdomain
echo "SSH connection up."
echo "SSH connection down."
echo "Trying to connect ..."
ssh -N -f -R 3307:localhost:3306 firstname.lastname@example.org