As long as the specific messages have not been changed between the two ROS distributions (which is only rarely the case) it should be work fine. One likely problem you are running into is that one of your computers can not resolve the other one without some more hints. Please read http://wiki.ros.org/ROS/NetworkSetup and see if setting ROS_IP / ROS_HOSTNAME makes it work for you.