postgres user with automate rsync and private/public key pairs

From: Daniel Vázquez <daniel2d2art(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: postgres user with automate rsync and private/public key pairs
Date: 2013-06-13 22:35:54
Message-ID: CA+KJVfybciWA956qWZHMm=M0xp2Rvay0NjbuTvnS0Wp7+tvzjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi here!

Centos 6.4
Postgres 9.1

I want to automate rsync backups from server1 to server2 via ssh using the
postgres(linux deamon user) and a pair of private/public keys generated by
ssh-keygen

I generated the keys in Server1 and copy and added id_rsa.pub to
/var/lib/pgsql/.ssh/authorized_keys in Server2. all owned by
postgres:postgres and chmod 700 to .ssh/ folder and chmod 600 to
authorized_key file.
But when try to test it and try to access via ssh always ask for postgres
password.

Same procedure works properly for others user, but not for postgres user.
postgres user is installed without password, I believed that this is the
problem and I try to set a password, but the problem persists although
postgres user has a password, can connect without avoid the ssh password
required prompt.

At first it seems that everything is properly configured, I forget
something?
Can postgres (linux user) login via ssh with private/public pair keys?

Last think ... I try to reset the postgres user as initial setup (without
password) using passwd -d command but shadow file shows different blank
password is not as double exclamation I don't know if it's indiferent for
correct postgres work or there are some way to reset original postgres user
values.

postgres::15849:0:99999:7:::

instead of:

postgres:!!:15646::::::

Thanks for your comments

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-06-13 22:54:44 Re: postgres user with automate rsync and private/public key pairs
Previous Message Alvaro Herrera 2013-06-13 22:18:35 Re: single-user vs standalone in docs and messages