get ip address of SMB network machine
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
smbip() {
smbutil lookup $1 | head -1 | ruby -nle 'puts $_.split.last;'
}
Then you can
ssh `smbip machine_name`
Written by Mr Rogers
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#