Host is running FreeBSD 14.0-CURRENT #88 main-n247993-7a0c0ff7ee2: Thu Jul 15 08:08:53 CEST 2021 amd64, KTLS enabled (if it matters). databses/postgresql13-server|client are installed and have been recompiled recently via "portmaster -df", even today the binaries have been recompiled again to asure the problem is not to be caused by outdated binaries.
Authetication method switched to SCRAM-SHA-256, passwords reset accordingly.
Problem: connecting to the DB server from the local machine via socket causes no problem. Connecting to the DB server on the local machine from the local machine via "-h 127.0.0.1" or "-h ::1" or "-h localhost" does end up in a very long login phase which ends with
psql: error: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
From a remote machine, also 14-CURRENT of the same state and with pgsql from databases/postgresql13-client, I receive the same - the server's log does show a connection entry like
2021-07-15 13:11:57.420 CEST  LOG: connection received: host=host.name.bla port=33146
and nothing further.
I tried to adjust pg_hba.conf according to host/hostssl entries for remote login (the user in question is allowed to remotely login) and played around with this, tried as many permutations as possible, without success.
Connecting from a host running a recent FreeBSD 13-STABLE-p3, also with a recent databases/postgresql13-client, connecting to the DB running on the 14-CURRENT box gives me:
psql: error: SSL SYSCALL error: EOF detected
The ppstgresql server seems to be completely "off grid" when it comes to network access, even when IPFW is configured to allow any to any (of course I have configured remote access and opened port 5432/tcp).
I'm out of ideas here. On FreeBSD 13-STABLE running psql 12 or 13 I do not see such problems.