From barman server, I am able to ssh to postgres server without password
barman@backup$ ssh postgres@pg
Vice-versa, from postgres server, I am able to ssh to barman server without password
postgres@pg$ ssh barman@backup
But, when I try
barman@backup$ psql -c 'SELECT version()' -U postgres -h pg -p 5435
-- Postgres is running on port 5435 on postgres server.
1) It asks me to provide a password of the postgres user. So, do I need to set something in pg_hba.conf on the postgres server
2) Also, if I don't specify the port such as
barman@backup$ psql -c 'SELECT version()' -U postgres -h pg
psql: could not connect to server: Connection refused
Is the server running on host "pg" (10.152.239.133) and accepting
TCP/IP connections on port 5432?
-----
# barman check main shows:
Server main:
PostgreSQL: FAILED
directories: OK
retention policy settings: OK
backup maximum age: OK (no last_backup_maximum_age provided)
compression settings: OK
minimum redundancy requirements: FAILED (have 0 backups, expected at least 1) -- Not sure this error. It is set as minimum_redundancy = 1 in barman.conf
ssh: OK (PostgreSQL server)
not in recovery: OK
Please help.