You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a shell script you can use this to get the PID file.
ssh -l username server -N
PID="$!"
echo $PID > $PIDFILE
This way you can check the PIDFILE and if that process exists you can check to see if it is an ssh process and if so you can be reasonably sure that it is your process.
This is because ps -elf truncates the command that is running. This can be fixed by writing and reading a PID file.
The text was updated successfully, but these errors were encountered: