在Debian系统上进行远程桌面连接,通常有以下几种方法:XRDP、VNC和SSH隧道。以下是详细的步骤:
sudo apt update
sudo apt install xrdp
sudo systemctl enable --now xrdp
sudo ufw allow 3389
或者,如果你使用nftable:
sudo nft add rule inet filter input tcp dport 3389 ct state new,established counter accept
sudo apt install tigervnc-standalone-server
vncserver -depth 24 -name aru_desktop -httpport 5901
这将在5901端口启动VNC服务器。
配置VNC密码: 第一次运行VNC服务器时会要求输入一个密码,这个密码与SSH登录密码是分开的。
从Windows连接:
sudo apt install openssh-server
ssh -L 5901:localhost:5901 username@debian_ip
这将在本地端口5901到Debian机器上VNC服务器的隧道。
localhost:5901
。请注意,远程桌面连接可能会受到防火墙和网络配置的影响,确保在连接前检查相关的网络设置和防火墙规则。