Given Mac's on a local network, you can look up the IP by machine name using
smbutil lookup machine_name
The output is very verbose. If you want to use it to help
ssh between machines, it ends up being a bunch of cut and paste. Add the following to your bash profile
smbutil lookup $1 | head -1 | ruby -nle 'puts $_.split.last;'
Then you can
ssh `smbip machine_name`