I have followed the instructions you’ve provided and still having same issue in OP.
This system is not a fresh DietPi system, as it has been upgraded from Debian 11 → 12 → and now to 13. This functionality did work with the two previous Debian releases.
Here is what I get to verify that systemd-logind succeeded:
$ sudo systemctl status systemd-logind
● systemd-logind.service - User Login Management
Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static)
Drop-In: /usr/lib/systemd/system/systemd-logind.service.d
└─dbus.conf
Active: active (running) since Mon 2026-08-03 16:25:34 EDT; 3 days ago
Invocation: 072b2ceca5d44331b71845bb5f313dad
Docs: man:sd-login(3)
man:systemd-logind.service(8)
man:logind.conf(5)
man:org.freedesktop.login1(5)
Main PID: 362 (systemd-logind)
Status: "Processing requests..."
Tasks: 1 (limit: 9394)
FD Store: 2 (limit: 768)
Memory: 2.1M (peak: 2.8M)
CPU: 1.319s
CGroup: /system.slice/systemd-logind.service
└─362 /usr/lib/systemd/systemd-logind
Aug 03 22:00:09 trixienow systemd-logind[362]: Session c1 logged out. Waiting for processes to exit.
Aug 03 22:00:09 trixienow systemd-logind[362]: Removed session c1.
Aug 03 22:00:19 trixienow systemd-logind[362]: Removed session 1.
Aug 04 08:32:25 trixienow systemd-logind[362]: New session c2 of user root.
Aug 04 08:32:25 trixienow systemd-logind[362]: New session 22 of user root.
Aug 04 08:41:10 trixienow systemd-logind[362]: Session c2 logged out. Waiting for processes to exit.
Aug 04 08:41:10 trixienow systemd-logind[362]: Removed session c2.
Aug 04 08:41:20 trixienow systemd-logind[362]: Removed session 22.
Aug 06 22:37:03 trixienow systemd-logind[362]: New session c3 of user root.
Aug 06 22:37:04 trixienow systemd-logind[362]: New session 99 of user root.
$ pgrep sshd-session
22327
22329
22438
22440
$ echo $PPID
22329
When I SSH in, I still do not see the login with w, but if I sudo -i to the root user after login, then I do see that, as shown here:
$ w
22:42:58 up 3 days, 6:17, 0 users, load average: 0.51, 0.34, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
$ w
22:43:03 up 3 days, 6:17, 1 user, load average: 0.47, 0.34, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/1 - 22:43 7.00s 0.11s 0.04s sudo -i
This is unexpected behavior, so any suggestions on what to try next are greatly appreciated.