you can use ssh tunneling to allow user to connect to your database. such as
ssh -L local_port:IP address/hostname:server_port user@IP address/hostname.
here user will be OS user so it best to provide postgres superuser to connect.
But keep in mind that the postgresql database server must be on that server.
once done u can connect using simple psql command as
psql -h hostname/IP address -p port -U user -d database