I'm looking for a way to start a shell script after a sftp session exited.
Is it possible to trigger
/home/user/.bash_logout via sftp, how does it work?
I tried to set
RequestTTY force in
~/.ssh/config but this is not helping.
It's not possible on remote server to start any command after sftp session is over, it is because all what is executed on remote server while having sftp is content of
SSH_ORIGINAL_COMMAND env variable which points to
If you want to do anything on remote server, just create a wrapper and "force" it either via
ForceCommand or via
command= in your ssh public key in
For example I was playing with such wrapper to automatically
rsync mirror users data after sftp session is over to another server.