Please note that this isn't actually using the iMessage protocol, this just uses AppleScript to fire messages via Messages.app. However, it's nice to finally be able to iMessage over SSH. :)
That's correct. In the future, if time permits, I would like to figure out how to use private APIs within OS X or the Messages.app libraries to send messages without the AppleScript files. Unfortunately that's non-trivial and takes some serious poking around. Right now it's a useful solution for me over ssh so I wanted to share it with the community since I thought others might find that ability useful as well