In order to fix the error:
Welcome to NetBSD!
No entry for terminal type "xterm-ghostty";
using dumb terminal settings.$ infocmp -x xterm-ghostty > /tmp/ghostty.ti$ scp /tmp/ghostty.ti user@ip.local:~$ ssh user@ip.local$ tic -x ghostty.ti
$ mv ghostty.ti.cdb ~/.terminfo