Connecting servers


I have this problem, I have 2 Openfire servers, each server has it’s own user list, now on occasion i would like them to talk between

the two server, while they are logged on one or the other

Server A Server B

While like this they can only see the users on their own server.

But how can I connect Server A with Server B, so users from Server A can talk to users from Server B.

This also needs to be done with more than 2 servers.

Any ideas?