From 7674e9ebed14aed95d3e002b8a53f6a6e9f642e5 Mon Sep 17 00:00:00 2001 From: "ithink.chan" Date: Wed, 13 Nov 2019 11:59:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=20=E9=80=9A=E8=BF=87=20SSH?= =?UTF-8?q?=20=E9=9A=A7=E9=81=93=E8=BF=9B=E8=A1=8C=E8=BF=9E=E6=8E=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ithink.chan --- .../Manjaro/Manjaro_安装图形界面及开启_VNC.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Software/System/Linux/Manjaro/Manjaro_安装图形界面及开启_VNC.md b/Software/System/Linux/Manjaro/Manjaro_安装图形界面及开启_VNC.md index 379e448..4aca08d 100644 --- a/Software/System/Linux/Manjaro/Manjaro_安装图形界面及开启_VNC.md +++ b/Software/System/Linux/Manjaro/Manjaro_安装图形界面及开启_VNC.md @@ -27,7 +27,7 @@ pacman -S tigervnc vncserver ``` -第一次使用需要按提示输入密码,开启后会提示一个 \ 号。如果要关闭 vnc 可使用如下命令: +第一次使用需要按提示输入密码,开启后会提示一个 \ 号,num 与 VNC 的默认监听端口有一定对应关系,一般 num=0 时 VNC 默认监听 5900,num=1 时 VNC 默认监听 5901,以此类推。如果要关闭 vnc 可使用如下命令: ```sh vncserver -kill : @@ -58,6 +58,20 @@ exec dbus-launch xfce4-session 然后键入密码即可。 +## 通过 SSH 隧道进行连接 + +在服务器端: + +```sh +vncserver -localhost +``` + +在客户端: + +```sh +ssh @ -L :localhost: +``` + ## 参考资料 [Archlinux Wiki TigerVNC](https://wiki.archlinux.org/index.php/TigerVNC)