I've been struggling with an appropriate fix for this bug. I've also found that installing libpam-systemd seems to fix this for me in my testing. (If I discover it still to be a problem, I'll post again). However, I'd like to understand why libpam-systemd makes a difference if anyone has any insight?
Finally, there are issues with using the ssh.socket approach which are not at first apparent. When exiting an SSH session, all processes created under that session are terminated - which means tools like screen and tmux will not work. This may or may not be a problem for you, but it's certainly means ssh.socket is also not a drop-in replacement like ssh.service. Cheers Matt Black