Kynn Jones <kynnjo(at)gmail(dot)com> writes:
> But I have not found a way for my script to provide a password when it
> runs commands like dropdb, createdb, and pg_restore with the "-h <REMOTE
> HOST>" flag. So I end up resorting to SSH-tunneling. This is what I'm
> trying to avoid.
You don't really want to embed a password in the script anyway.
Consider using a ~/.pgpass file, or look at non-password-based
authentication mechanisms.
regards, tom lane