阅读量:2
以下是在Debian上利用TigerVNC进行远程监控的步骤:
-
安装TigerVNC服务器
sudo apt update sudo apt install tigervnc-standalone-server tigervnc-common -
设置VNC密码
vncpasswd按提示输入并确认密码(用于远程连接认证)。
-
配置VNC服务器
- 编辑配置文件(以显示编号:1为例):
替换内容为(需将sudo nano /etc/systemd/system/vncserver@:1.serviceyour_username替换为实际用户名):保存后执行:[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forking User=your_username Group=your_username WorkingDirectory=/home/your_username PIDFile=/home/your_username/.vnc/%H:%i.pid ExecStartPre=/usr/bin/vncserver -kill :%i > /dev/null 2>&1 ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i -localhost no ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.targetsudo systemctl daemon-reload sudo systemctl enable vncserver@:1.service sudo systemctl start vncserver@:1.service
- 编辑配置文件(以显示编号:1为例):
-
开放防火墙端口
sudo ufw allow 5901/tcp # 默认端口5901(对应显示编号:1) sudo ufw reload -
客户端连接
- 在客户端安装VNC Viewer(如TigerVNC Viewer、RealVNC Viewer)。
- 输入服务器IP:端口(如
192.168.1.100:1),使用之前设置的VNC密码连接。
可选优化:
- 配置
~/.vnc/xstartup文件启动特定桌面环境(如GNOME/XFCE)。 - 使用非root用户启动服务,提升安全性。
以上就是关于“如何在Debian上利用TigerVNC进行远程监控”的相关介绍,筋斗云是国内较早的云主机应用的服务商,拥有10余年行业经验,提供丰富的云服务器、租用服务器等相关产品服务。云服务器资源弹性伸缩,主机vCPU、内存性能强悍、超高I/O速度、故障秒级恢复;电子化备案,提交快速,专业团队7×24小时服务支持!
简单好用、高性价比云服务器租用链接:https://www.jindouyun.cn/product/cvm