On Ubuntu 18.04, NetworkManager is used. After modifying the configuration of an interface remotely, using the NetworkManager CLI.
Example:
nmcli connection modify (interface_profile_name) ipv4.addresses (XXX.XXX.XXX.XXX/XX)
How can I make it taken into account without shutting down my remote access?
I tried:
nmcli device disconnect (interface_name) && sleep 5 && nmcli connection up (interface_name)
Because it is recommended to disconnect, and then reconnect the modified interface, but it cuts my access to the computer, the old and the new IP address are unreachable. I have to move on the targeted computer to make locally the modifications.
I want to be able to make the modifications taken into account remotely, with nmcli by an SSH connection, and without restarting the computer (nothing extraordinary ^^).
The restart of the NetworkManager service doesn't change anything.
Thank you.