一、SSH & SFTP
sudo apt update
sudo apt install ssh
vi /etc/ssh/sshd_config
Subsystem sftp internal-sftp
systemctl restart sshd.service
二、VNC
sudo apt install -y x11vnc
x11vnc
sudo x11vnc -storepasswd /etc/x11vnc.pass
sudo vim /usr/lib/systemd/system/x11vnc.service
sudo chmod 755 /lib/systemd/system/x11vnc.service
sudo chown root:root /lib/systemd/system/x11vnc.service
sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service
sudo reboot
sudo systemctl enable xrdp
sudo systemctl restart xrdp
三、x11vnc.service
[Unit]
Description="x11vnc"
Requires=display-manager.service
After=display-manager.service
[Service]
ExecStart=/usr/bin/x11vnc -auth guess -loop -forever -safer -shared -ultrafilexfer -bg -o /var/log/x11vnc.log
ExecStop=/usr/bin/killall x11vnc
[Install]
WantedBy=multi-user.target