When I run
sudo do-release-upgrade
over ssh, I get the following message.
This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover. If you continue, an additional ssh daemon will be started at port '9004'. Do you want to continue?
What is the real risk of upgrading over ssh? How does the additional ssh daemon help mitigate this?
Best Answer
What I would recommend doing is launching a screen session on the server and running the upgrade in screen - that way if your SSH session drops (for whatever reason) the upgrade process will not halt.
Screen is a program that allows for persistent terminal(s) on a machine. So you can start a screen session and so long as the machine is on that screen session (and it's history, running programs, etc) will continue to operate though no one user is on the machine. It was designed in the early days to provide a multi-windowed text terminal prior to the days of X Server. You can install it using APT:
So you can ssh into your server, start screen, initiate the upgrade process and not have to worry about the upgrade bing botched because you've lost Internet connection or your computer crashed.