Actually there are two ways.
1) In iMessage Account set up the same Apple ID on both computers.
You can then "Send" to your Own Apple ID and it will appear like a synced messages on the other computer.
1a) Alternatively you can set the up with different IDs but then have the other ID listed as Also Receive At on each computer.
Each computer/Messages app gets a Bonjour Account.
By default it is Off.
When Enabled it takes your First Name, Last Name from your My Card in the Contacts List (Formerly the Address Book) and broadcasts this to your "Buddies".
Your "Buddies" are the other Macs on your LAN (You see their "Name" from their Contacts or Address Book List)
It can work over VPN connection as well as just LAN based connections.
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images." No, Seriously