If the both DBs(from & to) are password protected, in that scenario terminal won't ask for the password for both the DBs, password prompt will appear only once.
So, to fix this, pass the password along with the commands.
PGPASSWORD= pg_dump -h -U -t > | PGPASSWORD= psql -h -d -U