前端开发入门到精通的在线学习网站

网站首页 > 资源文章 正文

开源的远程桌面网关-Next Terminal

qiguaw 2025-07-27 23:21:28 资源文章 4 ℃ 0 评论

介绍

Next Terminal是基于Golang和React开发的一款HTML5的远程桌面网关,具有小巧、易安装、易使用、资源占用小的特点,支持RDP、SSH、VNC和Telnet协议的连接和管理。软件遵守AGPL开源协议。

主要功能:

  • 授权凭证管理
  • 资产管理(支持RDP、SSH、VNC、TELNET协议)
  • 指令管理
  • 批量执行命令
  • 在线会话管理(监控、强制断开)
  • 离线会话管理(查看录屏)
  • 双因素认证
  • 资产标签
  • 资产授权
  • 多用户&用户分组
  • 计划任务
  • ssh server

一、安装 Apache Guacamole-Server

1.执行安装命令

yum install -y epel-release
yum install -y libguac-client-kubernetes \
    libguac-client-rdp \
    libguac-client-ssh \
    libguac-client-telnet \
    libguac-client-vnc \
    guacd

2.配置 guacd 服务

mkdir /etc/guacamole/ && cat <<EOF >> /etc/guacamole/guacd.conf
[daemon]
pid_file = /var/run/guacd.pid
log_level = info


[server]
# 监听地址
bind_host = 127.0.0.1
bind_port = 4822
EOF

为了避免权限问题导致错误修改使用 root 用户启动guacd服务,修改
/usr/lib/systemd/system/guacd.service 文件,注释掉 User 和 Group 这两行。

3.启动 guacd 服务

# 重载服务
systemctl daemon-reload
# 开机自启
systemctl enable guacd
# 启动服务
systemctl start guacd
# 查看状态
systemctl status guacd

4.安装字体(SSH使用)#

#安装字体管理软件
yum install -y fontconfig mkfontscale
#下载字体文件并移动到 /usr/share/fonts/目录下
cd  /usr/share/fonts/
# 下载英文字体
wget https://gitee.com/dushixiang/next-terminal/raw/master/guacd/fonts/Menlo-Regular.ttf
# 下载中文字体
wget https://gitee.com/dushixiang/next-terminal/raw/master/guacd/fonts/SourceHanSansCN-Regular.otf
#更新字体
mkfontscale
mkfontdir
fc-cache

二、安装 Next Terminal#

示例步骤安装在 /usr/local/next-terminal,你可以自由选择安装目录。

国内用户如果访问不到GitHub,可从 Gitee 进行下载,地址为:
https://gitee.com/dushixiang/next-terminal

wget https://github.com/dushixiang/next-terminal/releases/latest/download/next-terminal.tgz
tar -zxvf next-terminal.tgz -C /usr/local/

在/usr/local/next-terminal或/etc/next-terminal下创建或修改配置文件config.yml

db: sqlite
# 当db为sqlite时mysql的配置无效
#mysql:
#  hostname: 172.16.101.32
#  port: 3306
#  username: root
#  password: mysql
#  database: next-terminal


# 当db为mysql时sqlite的配置无效
sqlite:
  file: 'next-terminal.db'
server:
  addr: 0.0.0.0:8088
# 当设置下面两个参数时会自动开启https模式(前提是证书文件存在)
#  cert: /root/next-terminal/cert.pem
#  key: /root/next-terminal/key.pem


# 授权凭证和资产的密码,密钥等敏感信息加密的key,默认`next-terminal`
#encryption-key: next-terminal
guacd:
  hostname: 127.0.0.1
  port: 4822
  # 此路径需要为绝对路径,并且next-terminal和guacd都能访问到
  recording: '/usr/local/next-terminal/data/recording'
  # 此路径需要为绝对路径,并且next-terminal和guacd都能访问到
  drive: '/usr/local/next-terminal/data/drive'


sshd:
  # 是否开启sshd服务
  enable: false
  # sshd 监听地址,未开启sshd服务时此配置不会使用
  addr: 0.0.0.0:8089
  # sshd 使用的私钥地址,未开启sshd服务时此配置不会使用
  key: ~/.ssh/id_rsa

启动

./next-terminal

使用系统服务方式启动

执行以下命令创建 next-terminal 系统服务文件

cat <<EOF >> /etc/systemd/system/next-terminal.service
[Unit]
Description=next-terminal service
After=network.target

[Service]
User=root
WorkingDirectory=/usr/local/next-terminal
ExecStart=/usr/local/next-terminal/next-terminal
Restart=on-failure
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target
EOF

启动 Next-Terminal 服务

# 重载服务
systemctl daemon-reload
# 开机启动
systemctl enable next-terminal
# 启动服务
systemctl start next-terminal
# 查看状态
systemctl status next-terminal

nginx 反向代理

location / {
    proxy_pass http://127.0.0.1:8088/;
    proxy_set_header Host      $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
}

默认账户密码 admin

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表