If you are SSH’ed into interface eth0, if you do an
ifdown eth0, you lose connectivity. One thing I tested in a VirtualBox Debian virtual machine (VM) is the following command and my connection didn’t break. But before you do anything on a production system, test this out properly.
ifdown eth0 && ifup eth0
Or if you have sudo privileges, then only
sudo ifdown eth0 && sudo ifup eth0