Configure SSH Access to remote Linux Computers for BackupPC

There are a many ways to make Linux servers and clients to authenticate and transfer data without asking for password each time. In this guide, rsync protocol over SSH is used to do this.
In our case, we are giving access to backuppc user to access the remote machine using root credentials of the remote machine. This is required to configure BackupPC to backup Linux machines using rsync.
Step 1: log into the server with BackupPC user by using the following command
sudo su – backuppc
You will probably be presented with only a minimal prompt, represented by the dollar sign ($).
Step 2: create an SSH key pair for our "backuppc" user. Generate an SSH key pair by typing:
ssh-keygen
You will be asked for number of questions. You can type "Enter" through all of the prompts to accept the default values.
Step 3: Transfer the SSH Public key to the client machines. Now you have a private and public key on your backup server. You need to transfer the public key to the root user on each client machine you wish to access.
You can do that by typing:
ssh-copy-id root@client_ip_address
You should type "yes" to accept the new server's identity and then enter the root password of the remote machine. The key should be transferred now.
Step 4: Check that your key was transferred successfully by typing:
ssh root@client_ip_address
Note: You should be able to log in without having to type a password.

Step 5: Now, get back to the BackupPC server by typing “exit” two times.

1 comment:

  1. Error: ssh-copy-idt@192.168.#.# Not foun

    ReplyDelete