It is best to do this on the machine itself and not remotely as you will lose connection.
sudo cp /etc/network/interfaces /etc/network/interfaces.`date +"%m-%d-%Y_%I-%M-%S"` sudo sed -i 's|address 192.168.1.16|address 10.1.1.16|' /etc/network/interfaces sudo sed -i 's|netmask 255.255.255.0|netmask 255.255.0.0|' /etc/network/interfaces sudo sed -i 's|gateway 192.168.1.1|gateway 10.1.1.1|' /etc/network/interfaces sudo service resolvconf restart sudo /etc/init.d/networking restart sudo reboot
Last Updated on December 29, 2015