How to set up passwordless authentication for ZRM

  • 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:

  1. Become the mysql user:
    # su mysql
  2. 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/
    The key fingerprint is:
    61:b3:88:a4:dd:86:2c:ef:2f:73:8b:91:ec:aa:3d:4a mysql@sunil
  3. Copy the public ssh key, /var/lib/mysql/.ssh/ using the above example, on the ZRM server to the MySQL client machine to an alternate name, say,

Perform the following steps on the Client machine:

  1. Become the mysql user on the MySQL client machine:
    # su mysql
  2. 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 >> ~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