Originally posted by leffo:
You should use ifconfig. I think what you should do is:
Code:
ifconfig en0 <new IP-address>
To be safe, you should probably alias the new IP address first:
sudo ifconfig en0 <ip ip> alias
so that the Mac takes it on as a second IP address. You can then connect to that new IP address to make sure it's working, and delete the original address.
If you don't do that, and you make a mistake, you'll lose your ssh connection and won't be able to reconnect.
Note also that this command will only change the current IP address. When you reboot the machine will revert to the IP address assigned in System Preferences.