1960 remote upgrade

Support for remote upgrades.

Code review from: @Altonymous, @ckersh