This hopes to explain in simple steps setting up a pair (or more) servers as a trusted group.
So what do we want to achieve ? Well we wnat to be able to ssh, sftp, rsync etc between servers and not need to enter passwords
1 Hosts File
2 Editing sshd_config
3 Create the ssh keys
4 Setting up the Auth. users file
Firstly we need to make sure all servers are in the hosts file
# Do not remove the following line, or various programs
# that require network functionality will fail.
# We point to eth0 on our own box
# We point to eth1 on the other box
Now we need to edit the /etc/ssh/sshd_config file
so that the following
Now restart the sshd
Create the ssh keys
We now need to create the keys on each server
ssh-keygen -t rsa
and hit return for all the questions.
this will create 2 files in /root/.ssh
go the /root/.ssh directory and copy the id_rsa.pub to the other server and get its id_rsa.pub
put id_rsa.pub asterisk2.pub
get id_rsa.pub asterisk1.pub
Setting up the Auth. users file
In the /root/.ssh directory you will now have for example :-
asterisk1.pub id_rsa id_rsa.pub known_hosts
We now need to copy the asterisk1.pub to the authorized_keys file
cat asterisk1.pub >> authorized_keys
Do the same on the other server.
You should now be able to ssh and rsync between servers.