This article is for Zmanda Recovery Manager for MySQL (ZRM)Info Description:
For passwordless authentication, perform the following steps:
On the ZRM server, perform the following steps:
- Become the mysql user:
# su mysql
- Generate public and private keys:
# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key /var/lib/mysql/.ssh/id_rsa:
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/lib/mysql/.ssh/id_rsa.
Your public key has been saved in /var/lib/mysql/.ssh/id_rsa.pub.
The key fingerprint is:
- Copy the public ssh key, /var/lib/mysql/.ssh/id_rsa.pub using the above example, on the ZRM server to the MySQL client machine to an alternate name, say, servers_id_rsa.pub.
Perform the following steps on the Client machine:
- Become the mysql user on the MySQL client machine:
# su mysql
- If the authorized_keys file is not present in the .ssh folder in the home directory of mysql user, create the file. Append the contents of backup server's public ssh key to the mysql users' authorized_keys file.
# cat servers_id_rsa.pub >> ~mysql/.ssh/authorized_keys
After performing these steps, the mysql user from the ZRM Server will be able to login to the MySQL client machine without a password by using key-based authentication