I have a Linux guest on my Mac host that I mount a folder from with sshfs.
My workflow is that I turn on the VM in VirtualBox, connect with sshfs with sshfs max@vm:/home/max/scripts/ ~/vm/ -o defer_permissions -o volname=VM, and when I'm ready I unmount with umount ~/vm.
Sometimes I forgot to unmount before turning of the VM, which results in the terminal session freezing until I turn on the VM again, or me having to kill the process and force unmount the volume, as described here.
I don't care about reconnecting to this specific VM as it's on my local machine and always should work, so I'd like to to unmount directly, or at least after some seconds of inactivity. I have checked sshfs -h but didn't find any obvious flag for this behavior, or should the behavior be configured elsewhere (osxfuse, macOS system, etc)?