如何在 Rocky Linux 8 上安装和使用 Apache Guacamole 远程桌面
在此页
- 先决条件
- 第 1 步 - 配置防火墙
- 第 2 步 - 安装库
- 第 3 步 - 安装 Apache Tomcat
- 安装Java
- 创建 Tomcat 用户
- 下载Tomcat
- 创建一个 Systemd 单元文件并启动 Tomcat
- 配置 Apache Guacamole 数据库身份验证
- 配置鳄梨调味酱属性文件
- 为反向代理连接配置 Tomcat
- 安装 Nginx
- 创建一个新的管理员用户
Apache Guacamole 是一个免费、开源、无客户端的远程桌面网关。它支持 SSH、RDP 和 VNC 等标准协议。它不需要任何第三方插件和客户端即可工作。您可以使用基于 Web 的网关访问您的机器。它可以放在代理服务器后面,让您可以从世界任何地方访问您的服务器。
鳄梨酱由两部分组成:
guacamole-server
包含 Guacamole 连接到远程桌面所需的所有本机服务器端组件。guacd
是在 Guacamole 服务器上运行的代理守护程序,它接受用户连接,然后将它们连接到远程桌面。guacamole-client
包含 Guacamole 的所有 Java 和 Javascript 组件,它们构成了网络应用程序,用户可以在其中连接到他们的桌面。
在本教程中,您将学习如何在基于 Rocky Linux 8 的服务器上安装和使用 Apache Guacamole。您还将学习如何使用它连接到远程桌面。我们将通过从其源代码构建来安装 Guacamole。
先决条件
-
A server running Rocky Linux 8 with a minimum of 2GB RAM and 2 CPU Cores.
-
A domain name for the helpdesk pointing to the server. For our tutorial, we will use the
uvdesk.example.com
domain. -
A non-root based user with sudo privileges.
-
Make sure everything is updated.
$ sudo dnf update
-
Install basic utility packages. Some of them may already be installed.
$ sudo dnf install wget curl nano unzip yum-utils -y
第 1 步 - 配置防火墙
第一步是配置防火墙。 Rocky Linux 使用 Firewalld 防火墙。检查防火墙状态。
$ sudo firewall-cmd --state running
防火墙适用于不同的区域,公共区域是我们将使用的默认区域。列出防火墙上所有活动的服务和端口。
$ sudo firewall-cmd --permanent --list-services
它应该显示以下输出。
cockpit dhcpv6-client ssh
允许 HTTP 和 HTTPS 端口。
$ sudo firewall-cmd --permanent --add-service=http $ sudo firewall-cmd --permanent --add-service=https
重新检查防火墙的状态。
$ sudo firewall-cmd --permanent --list-services
您应该会看到类似的输出。
cockpit dhcpv6-client http https ssh
重新加载防火墙以启用更改。
$ sudo firewall-cmd --reload
第 2 步 - 安装库
在安装库之前,我们需要安装 EPEL 存储库并启用 PowerTools 存储库。
$ sudo dnf install epel-release -y $ sudo dnf config-manager --set-enabled powertools
第一步是安装构建鳄梨酱所需的库。安装所需的库。
$ sudo dnf install cairo-devel libjpeg-turbo-devel libjpeg-devel libpng-devel libtool libuuid-devel uuid-devel make cmake
上述依赖项是强制性的,这意味着没有它们,鳄梨酱就无法构建。您可以安装一些可选的依赖项来添加对各种协议和功能的支持。
但首先,您需要启用 RPMFusion Free Repository,因为它包含包
ffmpeg-devel
。$ sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
安装可选的依赖项。
$ sudo dnf install ffmpeg-devel freerdp-devel pango-devel libssh2-devel libtelnet-devel libvncserver-devel libwebsockets-devel pulseaudio-libs-devel openssl-devel compat-openssl10 libvorbis-devel libwebp-devel libgcrypt-devel
第 3 步 - 安装 Apache Tomcat
对于我们的教程,我们将安装 Apache Tomcat 9,它需要 Java 8 及更高版本才能工作。
安装Java
我们将安装 OpenJDK 11,这是 Java 平台的开源实现。
运行以下命令来安装 OpenJDK。
$ sudo dnf install java-11-openjdk-devel
验证安装。
$ java -version openjdk 11.0.14 2022-01-18 LTS OpenJDK Runtime Environment 18.9 (build 11.0.14+9-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.14+9-LTS, mixed mode, sharing)
创建 Tomcat 用户
接下来,为 Tomcat 服务创建一个用户。我们将设置
/opt/tomcat
作为主目录。$ sudo useradd -m -U -d /opt/tomcat -s /bin/false tomcat
下载 Tomcat
可以从其下载页面下载最新版本的 Tomcat v10。在编写本教程时,v9.0.59 是最新的可用版本。在下载 Tomcat 之前检查最新版本。
使用
wget
下载Tomcat。$ TVERSION=9.0.59 $ wget https://dlcdn.apache.org/tomcat/tomcat-9/v${TVERSION}/bin/apache-tomcat-${TVERSION}.tar.gz
将文件解压到
/opt/tomcat
目录。$ sudo tar -xf apache-tomcat-${TVERSION}.tar.gz --strip-components=1 -C /opt/tomcat/
将目录的所有权更改为 Tomcat 用户。
$ sudo chown -R tomcat:tomcat /opt/tomcat
创建 Systemd 单元文件并启动 Tomcat
创建并打开文件
/etc/systemd/system/tomcat.service
进行编辑。$ sudo nano /etc/systemd/system/tomcat.service
粘贴以下代码。
[Unit] Description=Apache Tomcat 9 Servlet container Wants=network.target After=network.target [Service] Type=forking User=tomcat Group=tomcat Environment="JAVA_HOME=/usr/lib/jvm/jre" Environment="JAVA_OPTS=-Djava.awt.headless=true" Environment="CATALINA_BASE=/opt/tomcat" Environment="CATALINA_HOME=/opt/tomcat" Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid" Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC" ExecStart=/opt/tomcat/bin/startup.sh ExecStop=/opt/tomcat/bin/shutdown.sh Restart=always [Install] WantedBy=multi-user.target
通过按 Ctrl + X 并在提示保存时输入 Y 来保存文件。
重新加载服务守护进程以启用 Tomcat 服务。
$ sudo systemctl daemon-reload
启用并启动 Tomcat 服务。
$ sudo systemctl enable tomcat --now
检查服务状态。
$ sudo systemctl status tomcat ? tomcat.service - Apache Tomcat 9 Servlet container Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2022-03-09 09:48:38 UTC; 8s ago Process: 25308 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS) Main PID: 25315 (java) Tasks: 29 (limit: 11412) Memory: 154.9M CGroup: /system.slice/tomcat.service ??25315 /usr/lib/jvm/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties .. Mar 09 09:48:38 guacamole systemd[1]: Starting Apache Tomcat 9 Servlet container... Mar 09 09:48:38 guacamole systemd[1]: Started Apache Tomcat 9 Servlet container.
第 4 步 - 下载并构建鳄梨酱
你可以获得1.4.0。下载鳄梨酱源代码。
$ GVERSION=1.4.0 $ wget https://downloads.apache.org/guacamole/${GVERSION}/source/guacamole-server-${GVERSION}.tar.gz
提取存档并切换到新创建的目录。
$ tar -xzf guacamole-server-${GVERSION}.tar.gz $ cd guacamole-server-${GVERSION}/
运行
configure
命令以确定哪些库可用并选择要构建的组件。$ ./configure --with-systemd-dir=/etc/systemd/system/
目录
/etc/systemd/system/
是在构建过程中将安装启动脚本的位置,用于将 Guacamole 配置为在启动时自动启动。成功完成后,您将获得以下输出。
checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes ... ------------------------------------------------ guacamole-server version 1.4.0 ------------------------------------------------ Library status: freerdp2 ............ yes pango ............... yes libavcodec .......... yes libavformat.......... yes libavutil ........... yes libssh2 ............. yes libssl .............. yes libswscale .......... yes libtelnet ........... yes libVNCServer ........ yes libvorbis ........... yes libpulse ............ yes libwebsockets ....... yes libwebp ............. yes wsock32 ............. no Protocol support: Kubernetes .... yes RDP ........... yes SSH ........... yes Telnet ........ yes VNC ........... yes Services / tools: guacd ...... yes guacenc .... yes guaclog .... yes FreeRDP plugins: /usr/lib64/freerdp2 Init scripts: no Systemd units: /etc/systemd/system/ Type "make" to compile guacamole-server.
如果您没有安装某些库,您将在输出中看到
no
而不是yes
。但如果缺少关键库,该命令将失败。要检查更多配置选项,请运行./configure --help
命令。使用以下命令编译并安装 Guacamole 服务器。
$ make && sudo make install
运行以下命令以更新已安装库的系统缓存。
$ sudo ldconfig
重新加载服务守护进程。
$ sudo systemctl daemon-reload
启用并启动鳄梨酱服务。
$ sudo systemctl enable guacd --now
验证服务的状态。
$ sudo systemctl status guacd ? guacd.service - Guacamole Server Loaded: loaded (/etc/systemd/system/guacd.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2022-03-10 09:13:41 UTC; 7s ago Docs: man:guacd(8) Main PID: 85349 (guacd) Tasks: 1 (limit: 11181) Memory: 10.8M CGroup: /system.slice/guacd.service ??85349 /usr/local/sbin/guacd -f Mar 10 09:13:41 guacamole systemd[1]: Started Guacamole Server. Mar 10 09:13:41 guacamole guacd[85349]: Guacamole proxy daemon (guacd) version 1.4.0 started Mar 10 09:13:41 guacamole guacd[85349]: guacd[85349]: INFO: Guacamole proxy daemon (guacd) version 1.4.0 started Mar 10 09:13:41 guacamole guacd[85349]: guacd[85349]: INFO: Listening on host ::1, port 4822 Mar 10 09:13:41 guacamole guacd[85349]: Listening on host ::1, port 4822
第 5 步 - 安装鳄梨酱客户端
现在您已经安装了服务器,下一步就是安装客户端。
为鳄梨酱创建配置目录。
$ sudo mkdir /etc/guacamole
与 Guacamole 服务器不同,Guacamole 客户端以源代码和二进制形式提供。对于我们的教程,我们将下载二进制文件。但是,您可以选择从源代码构建客户端。
从网站下载 Guacamole 客户端二进制文件。
$ sudo wget https://downloads.apache.org/guacamole/${GVERSION}/binary/guacamole-${GVERSION}.war -O /etc/guacamole/guacamole.war
上述命令下载鳄梨酱二进制文件并将其复制到
/etc/guacamole
目录。要使客户端正常运行,需要从 Tomcats 目录部署它,该目录为
$CATALINA_HOME/webapps/
。在第3步中,我们将/opt/tomcat
设置为$CATALINA_HOME
。运行以下命令以创建从
/etc/guacamole/guacamole.war
到 Tomcat webapps 目录的符号链接。$ sudo ln -s /etc/guacamole/guacamole.war /opt/tomcat/webapps/
将应用程序的权限更改为
tomcat
用户。$ sudo chown -R tomcat:tomcat /opt/tomcat/webapps
在
/etc/guacamole/guacd.conf
中创建 Web 应用程序配置文件。$ sudo nano /etc/guacamole/guacd.conf
将以下代码粘贴到其中。将
your_server_IP
替换为您的服务器公共 IP 地址。# # guacd configuration file # [daemon] #pid_file = /var/run/guacd.pid log_level = info [server] bind_host = your_server_IP bind_port = 4822 # # The following parameters are valid only if # guacd was built with SSL support. # # [ssl] # server_certificate = /etc/ssl/certs/guacd.crt # server_key = /etc/ssl/private/guacd.key
通过按 Ctrl + X 并在提示保存时输入 Y 来保存文件。
重新启动 Guacamole 服务器和 Tomcat 以应用更改。
$ sudo systemctl restart tomcat guacd
第 6 步 - 安装和配置 MySQL
Apache Guacamole 提供了多种类型的身份验证方法。出于测试目的,简单的基于密码的身份验证就足够了。但对于生产环境,我们需要实施更强大、更好的身份验证方法。在这里,我们将使用 MySQL 实现基于数据库的身份验证。
安装 MySQL。
$ sudo dnf install mysql-server
启用并启动 MySQL 服务。
$ sudo systemctl enable mysqld --now
安全的 MySQL 安装。
$ sudo mysql_secure_installation
第一步,系统会询问您是否要设置验证密码插件,您可以使用它来测试 MySQL 密码的强度。选择
Y
继续。下一步将要求您选择密码验证级别。选择最强等级的2
,要求您的密码长度至少为八个字符,并且包括大写、小写、数字和特殊字符的组合。Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: Y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
下一步将要求您选择根密码。选择一个满足密码验证插件要求的强密码。在下一步中,系统将询问您是否继续使用所选密码。按
y
继续。Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
按
Y
然后按ENTER
键以获取以下所有提示以删除匿名用户和测试数据库,禁用 root 登录并加载新设置的规则。... Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y Success. ... Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y Success. ... Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. ... Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y Success. All done!
进入 MySQL 外壳。输入您的根密码以继续。
$ mysql -u root -p
创建
guacamole_user
用户。确保密码符合之前设置的要求。mysql> CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'Your_password2';
创建
guacamole_db
数据库。mysql> CREATE DATABASE guacamole_db;
授予用户对
guacamole_db
数据库的权限。mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
退出外壳。
mysql> exit
第 7 步 - 配置 Apache Guacamole
Guacamoles 配置目录由变量
GUACAMOLE_HOME
定义。所有的配置文件、扩展等,都在这个目录中。/etc/guacamole/guacamole.properties
文件存储鳄梨酱及其扩展的所有配置和设置。扩展和库需要额外的目录。创建它们。
$ sudo mkdir /etc/guacamole/{extensions,lib}
设置 Guacamole home 变量并将其存储在
/etc/default/tomcat
配置文件中。$ echo "GUACAMOLE_HOME=/etc/guacamole" | sudo tee -a /etc/default/tomcat
配置 Apache Guacamole 数据库身份验证
我们已经在上一步中为鳄梨酱设置了数据库。我们需要下载 Guacamole JDBC authenticator 插件和 MySQL Java Connector 库来完成配置。
从其网站下载 Guacamole JDBC 插件。
$ cd ~ $ wget https://downloads.apache.org/guacamole/${GVERSION}/binary/guacamole-auth-jdbc-${GVERSION}.tar.gz
将插件解压缩到
/etc/guacamole/extensions
目录。$ tar -xf guacamole-auth-jdbc-${GVERSION}.tar.gz $ sudo mv guacamole-auth-jdbc-${GVERSION}/mysql/guacamole-auth-jdbc-mysql-${GVERSION}.jar /etc/guacamole/extensions/
下一步是将 SQL 模式导入 MySQL 数据库。切换到提取的插件目录。
$ cd guacamole-auth-jdbc-${GVERSION}/mysql/schema
将架构文件导入 MySQL。
$ cat *.sql | mysql -u root -p guacamole_db
下载 MySQL Java 连接器。获取与平台无关的归档文件。在编写本教程时,最新的可用版本是 8.0.28。
$ cd ~ $ wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.28.tar.gz
提取存档并将其内容复制到
/etc/guacamole/lib
目录。$ tar -xf mysql-connector-java-8.0.28.tar.gz $ sudo mv mysql-connector-java-8.0.28/mysql-connector-java-8.0.28.jar /etc/guacamole/lib/
配置鳄梨调味酱属性文件
创建
/etc/guacamole/guacamole.properties
文件并打开它进行编辑。$ sudo nano /etc/guacamole/guacamole.properties
将以下代码粘贴到其中。将
your_server_ip
替换为您的服务器公共 IP 地址。guacd-hostname: your_server_ip guacd-port: 4822 # MySQL properties mysql-hostname: localhost mysql-database: guacamole_db mysql-username: guacamole_user mysql-password: Your_password2
通过按 Ctrl + X 并在提示保存时输入 Y 来保存文件。
将 Guacamole 配置目录链接到 Tomcat servlet 目录。
$ sudo ln -s /etc/guacamole /opt/tomcat/.guacamole
重新启动 Tomcat 以启用数据库身份验证。您不需要重新启动
guacd
因为它完全独立于 Web 应用程序并且不以任何方式处理guacamole.properties
或数据库身份验证.$ sudo systemctl restart tomcat
第 8 步 - 安装 SSL
要使用 Lets Encrypt 安装 SSL 证书,我们需要安装 Certbot 工具。 Certbot 需要 EPEL 存储库进行安装,但我们可以直接继续安装,因为我们之前已经安装了它。
运行以下命令来安装 Certbot。
$ sudo dnf install certbot
生成 SSL 证书。
$ sudo certbot certonly --standalone --agree-tos --no-eff-email --staple-ocsp --preferred-challenges http -m -d guacamole.example.com
上面的命令会将证书下载到服务器上的
/etc/letsencrypt/live/guacamole.example.com
目录。生成 Diffie-Hellman 组证书。
$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
为 Lets Encrypt 自动更新创建一个挑战 webroot 目录。
$ sudo mkdir -p /var/lib/letsencrypt
创建 Cron 作业以更新 SSL。它将每天运行以检查证书并在需要时更新。为此,首先,创建文件
/etc/cron.daily/certbot-renew
并打开它进行编辑。$ sudo nano /etc/cron.daily/certbot-renew
粘贴以下代码。
#!/bin/sh certbot renew --cert-name guacamole.example.com --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
通过按 Ctrl + X 并在出现提示时输入 Y 来保存文件。
更改任务文件的权限以使其可执行。
$ sudo chmod +x /etc/cron.daily/certbot-renew
第 9 步 - 安装 Nginx 并将其配置为反向代理
为反向代理连接配置 Tomcat
在安装Nginx之前,我们需要配置Tomcat通过Nginx反向代理提供的远程IP地址。
打开
/opt/tomcat/conf/server.xml
文件进行编辑。$ sudo nano /opt/tomcat/conf/server.xml
在文件中找到以下行。
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
通过在其下方粘贴其他代码来更改该行,使其看起来如下所示。
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.RemoteIpValve" internalProxies="127.0.0.1" remoteIpHeader="x-forwarded-for" remoteIpProxiesHeader="x-forwarded-by" protocolHeader="x-forwarded-proto" />
通过按 Ctrl + X 并在出现提示时输入 Y 来保存文件。
安装 Nginx
Rocky Linux 8.5 附带了最新的稳定版 Nginx。使用以下命令安装它。
$ sudo dnf module install nginx:1.20
验证安装。
$ nginx -v nginx version: nginx/1.20.1
启用 Nginx 服务。
$ sudo systemctl enable nginx
创建并打开文件
/etc/nginx/conf.d/guacamole.conf
进行编辑。$ sudo nano /etc/nginx/conf.d/guacamole.conf
将以下代码粘贴到其中。
server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name guacamole.example.com; access_log /var/log/nginx/guacamole.access.log; error_log /var/log/nginx/guacamole.error.log; # SSL ssl_certificate /etc/letsencrypt/live/guacamole.example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/guacamole.example.com/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/guacamole.example.com/chain.pem; ssl_session_timeout 5m; ssl_session_cache shared:MozSSL:10m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1; ssl_stapling on; ssl_stapling_verify on; ssl_dhparam /etc/ssl/certs/dhparam.pem; resolver 8.8.8.8; location / { proxy_pass http://127.0.0.1:8080/guacamole/; proxy_buffering off; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; client_max_body_size 1g; access_log off; } } # enforce HTTPS server { listen 80; listen [::]:80; server_name guacamole.example.com; return 301 https://$host$request_uri; }
完成后按 Ctrl + X 并在出现提示时输入 Y 来保存文件。
打开文件
/etc/nginx/nginx.conf
进行编辑。$ sudo nano /etc/nginx/nginx.conf
在行
include /etc/nginx/conf.d/*.conf;
之前添加以下行。server_names_hash_bucket_size 64;
通过按 Ctrl + X 并在出现提示时输入 Y 来保存文件。
验证 Nginx 配置文件语法。
$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
修复 SELinux 权限以允许 Nginx 建立网络连接。
$ sudo setsebool -P httpd_can_network_connect 1
启动 Nginx 服务以启用新配置。
$ sudo systemctl start nginx
重新启动 Tomcat 服务器以应用配置更改。
$ sudo systemctl restart tomcat
第 10 步 - 获取鳄梨酱
在浏览器中打开 URL
https://guacamole.example.com
,您将看到以下屏幕。输入
guacadmin
作为用户名,输入guacadmin
作为密码,然后单击“登录”继续。创建一个新的管理员用户
为了安全起见,您应该创建一个新用户并删除现有用户。为此,请单击右上角的
guacadmin
,然后从下拉菜单中单击“设置”菜单。切换到“用户”选项卡并单击“新用户”按钮开始。
输入您的详细信息并勾选所有权限。
完成后单击保存。注销 guacadmin 用户并使用新创建的用户重新登录。
返回到用户屏幕。选择要编辑的 guacadmin 用户,然后单击底部的删除按钮删除该用户。
第 11 步 - 如何使用鳄梨酱
在我们的教程中,我们将向您展示如何使用 SSH 协议连接到服务器。
转到 Guacamole 的“设置”菜单并选择“连接”。在“连接”屏幕下,按“新建连接”按钮。
为连接选择一个名称,然后从下拉菜单中选择 SSH 作为协议。
在“参数”部分下,输入您的服务器 IP 地址作为主机名,22 作为端口(或者如果您有自定义 SSH 端口,请使用该端口)和您的用户名。如果您使用基于密码的身份验证,请输入用户密码或粘贴私钥。如果您正在使用私钥,请输入私钥的密码。
如果您想启用任何其他设置,请执行此操作。单击保存以完成添加连接。
返回仪表板并单击所有连接下的连接名称,您将被带到 SSH 终端。
结论
我们关于安装和使用 Apache Guacamole 在基于 Rocky Linux 8 的服务器上创建 SSH 连接的教程到此结束。如果您有任何问题,请在下面的评论中发表。