Can't /ssh: into TrueNas SCALE root user with Emacs TRAMP
This is happening because TrueNAS’s root user runs a .zshrc file where PROMPT= is set to something that TRAMP doesn’t understand.
While in an SSH session as root on the TrueNAS machine, make sure that you’re running zsh using echo $0, then open the file /root/.zshrc, comment out PROMPT​="%n@%m[%40<...<%~%<<]# " (fourth line from the top), save, and try connecting with TRAMP again.