PDA

View Full Version : ssh-copy plugin and public key authentication


D43m0n
March 9th, 2007, 07:47 AM
I'm setting up MySQL-zrm 1.1.4 for the first time (installed the RPM) on FC4/FC6.

I'd like to use the ssh-copy plugin to perform a raw backup on a remote host.

When I perform a logical backup, it all works as expected. When I change the backup-mode to be raw, I suddenly need to enter a password. It seems to be the ssh password prompt. I don't want to use a password, instead I want to use a public key for SSH connections.

I have created a public/private key pair and copied the public key to the homedir of the mysql user on the remote host (authorized_keys in .ssh). When I login as the mysql user with ssh to the remote host, I don't need to enter a password (hence the public key is used to authenticate). But when I start the mysql-zrm-scheduler again, I still need to enter a password.

What am I not seeing here?

My guess is that the ssh-copy plugin doesn't use the key pair to authenticate. But why doesn't it complain when I set backup-mode to logical?

D43m0n
March 13th, 2007, 05:52 AM
OK,

after some searching I found what I was doing wrong. I created a mysql user on the host that runs mysql-zrm. Then I created a private/public key pair. I thought that the mysql-zrm command actually performing the backup would fork a new process as the mysql user.

Apparently I needed to copy the private key of that user to root's homedir...

Perhaps worth noting this somewhere in the documentation?