Files
dbx/docs/content/docs/ssh-tunnel.cn.mdx
T
t8y2 6a5a380fdd docs: migrate from VitePress to Fumadocs (Next.js)
- Replace VitePress with Fumadocs + Next.js for documentation site
- Configure i18n (English + 简体中文) with language switcher
- Migrate all 17 guide documents to MDX format with updated content
- Add ocean theme, GitHub/Discord/QQ social links
- Update GitHub Actions workflow for Next.js static export
- Update .gitignore for .next, out, .source directories
2026-05-06 10:17:17 +08:00

36 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: SSH 隧道
description: 通过 SSH 隧道安全地连接不允许直接远程访问的数据库服务器。
---
当数据库服务器不允许直接远程访问时,你可以通过 SSH 隧道安全地连接。DBX 内置了 SSH 隧道支持,无需手动在终端中建立隧道。
## 配置 SSH 隧道
在创建或编辑数据库连接时,启用"SSH 隧道"选项,然后填写以下信息:
- **SSH 主机** -- SSH 服务器的地址
- **SSH 端口** -- SSH 服务器的端口(默认 22)
- **SSH 用户名** -- 用于登录 SSH 服务器的用户名
## 认证方式
DBX 支持两种 SSH 认证方式:
### 密码认证
输入 SSH 用户的登录密码即可。适用于允许密码登录的服务器。
### 密钥认证
选择本地的 SSH 私钥文件进行认证:
- **密钥路径** -- 点击文件选择器,浏览并选择私钥文件(如 `~/.ssh/id_rsa`)
- **密钥密码** -- 如果私钥设置了密码保护,在此处输入密钥密码
密钥认证比密码认证更安全,推荐优先使用。
## 允许局域网访问
DBX 提供"允许局域网访问隧道"选项。启用后,同一局域网中的其他设备也可以通过你的机器访问该 SSH 隧道,适用于团队协作或需要在多个设备上共享数据库连接的场景。