Thread: postgres user with automate rsync and private/public key pairs

postgres user with automate rsync and private/public key pairs

From
Daniel Vázquez
Date:
<div dir="ltr"><div style="style">Hi here!</div><div style="style"><br /></div><div style="style">Centos 6.4 </div><div
style="style">Postgres9.1</div><div style="style"><br /></div><div style="style">I want to automate rsync backups from
server1to server2 via ssh using the postgres(linux deamon user) and a pair of private/public keys generated by
ssh-keygen</div><divstyle="style"><br /></div><div style="style">I generated the keys in Server1 and copy and added
id_rsa.pubto /var/lib/pgsql/.ssh/authorized_keys in Server2. all owned by postgres:postgres and chmod 700 to .ssh/
folderand chmod 600 to authorized_key file.</div><div style="style">But when try to test it and try to access via ssh
alwaysask for postgres password.<br /></div><div style="style"><br /></div><div style="style">Same procedure works
properlyfor others user, but not for postgres user.</div><div style="style"> 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
userhas a password, can connect without  avoid the ssh password required prompt.</div><div style="style"><br
/></div><divstyle="style">At first it seems that everything is properly configured, I forget something?<br /></div><div
style="style">Canpostgres (linux user) login via ssh with private/public pair keys?</div><div style="style"><br
/></div><divstyle="style">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
indiferentfor correct postgres work or there are some way to reset original postgres user values.</div><div
style="style"><br/></div><div style="style">  postgres::15849:0:99999:7::: </div><div style="style"><br /></div><div
style="style">insteadof:</div><div style="style"><br /></div><div style="style">  postgres:!!:15646::::::<br
/></div><divstyle="style"><br /></div><div style="style"><br /></div><div style="style">Thanks for your
comments</div><divstyle="style"><br /></div></div> 

Re: postgres user with automate rsync and private/public key pairs

From
Josh Berkus
Date:
Daniel,

The pgsql-hackers mailing list is for people working on the PostgreSQL
database engine itself.  Please post your question to one of the
following lists instead:

pgsql-general
pgsql-admin

Or you can use our IRC channel: http://www.postgresql.org/community/irc/

Thanks!

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com