一、准备
1)Debian9 最小化安装的机子一台
2)服务商可以设置快照的话尽量设置一个快照
二、安装桌面
使用ssh连接工具登录拥有管理员权限的账户
1)安装基础版gnome

apt -y install x-window-system-core gnome-core

2)允许root登录

修改/etc/gdm3/daemon.conf文件,在[security]下增加一行AllowRoot = true
修改/etc/pam.d/gdm-password文件,注释掉auth required pam_succeed_if.so user != root quiet_success

3)重启

sync&reboot

三、安装远程连接
1)安装xrdp

apt -y install xrdp

2)设置启动权限

dpkg-reconfigure xserver-xorg-legacy 选择 anybody

四、远程连接
使用win自带远程连接工具mstsc输入ip或域名直接连接即可
win10家庭版不自带mstsc,可以通过安装补丁解决