4
votes
2answers
131 views

Force command to be run on logout or disconnect?

I'm logging in to a system via SSH and I'd like to be able to force a command to be run on logout, whether that's an intentional logout (exiting the shell) or because my SSH connection has ...
2
votes
2answers
841 views

Can a shell script running in a ssh continue to run if the SSH instance closes? [duplicate]

I'm trying to write a shell script that does a lengthy batch job on a remote server. I'll be running the script over SSH. The thing is, I intend to start the script in the evening and collect the ...
2
votes
1answer
254 views

Script to let the user cancel a shell logout

I want to write a script to display a message and possibly cancel a logout from an interactive shell. This is because I often run background jobs in some of my shells and in the spur of the moment I ...