Skip to content

HaTin/JFXSSHClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JFX SSH Client

JFX SSH Client is a free, open-source, cross-platform SSH client for Windows, macOS, and Linux, built with JavaFX. It brings connection management, a full terminal emulator, an SFTP file manager, and SSH port forwarding (local / remote / dynamic SOCKS proxy) together in one desktop app — a lightweight open-source alternative to XShell, FinalShell, MobaXterm, SecureCRT, and PuTTY.

License: MIT Java JavaFX Platform

Keywords: SSH client · open-source SSH client · cross-platform SSH tool · terminal emulator · SFTP client · SSH port forwarding · SSH tunnel · SOCKS proxy · JavaFX SSH · XShell / FinalShell / MobaXterm / PuTTY alternative · Windows macOS Linux SSH

中文说明见 下半部分


Screenshots / 截图

Main window — connection tree & terminal / 主界面:连接树与终端

Main window

SFTP dual-pane file manager / SFTP 双栏文件管理器

SFTP file manager

Port forwarding manager / 端口转发管理

Port forwarding


Features

  • Connection management — create / edit / delete / duplicate connections, organized into nestable groups, persisted in SQLite.
  • SSH authentication — password and public-key. Private keys are pasted as content and stored encrypted in the database (with optional passphrase), not referenced by file path.
  • Terminal — multiple tabs, UTF-8, full ANSI / 256-color, scrollback, powered by the JediTerm core. A dedicated input box keeps IME/Chinese input working on macOS.
  • SFTP — dual-pane (local ⇄ remote) file manager with concurrent transfers, progress / speed / cancel, recursive folder upload, and same-name overwrite confirmation (with Overwrite-All / Skip-All).
  • Port forwarding — local (-L), remote (-R), and dynamic SOCKS (-D). Rules are persisted per connection, run in the background after the window closes, and can auto-start on connect. One-click Start All / Stop All.
  • Security — credentials encrypted with a user master password: PBKDF2-HMAC-SHA256 (600k iterations) → AES-256-GCM. The master password is never stored; the derived key lives only in memory.
  • Theming & i18n — Light / Dark themes and English / 简体中文, both switchable live without restart.
  • Host-key verification — known-hosts TOFU; warns on key mismatch.

Tech stack

Language / UI Java 21, JavaFX 21
SSH / SFTP / forwarding Apache MINA SSHD (client)
Terminal core JediTerm (JetBrains) via SwingNode
Storage SQLite (JDBC)
JSON / i18n Jackson
Logging SLF4J + Logback
Build / test Maven, JUnit 5

Build

Requires JDK 21. The shaded runnable jar is produced at target/jfxssh.jar.

mvn clean package          # build + run tests
mvn -DskipTests package    # build only

Run

JavaFX must be on the module path. The easiest way is a JDK that bundles JavaFX (e.g. Azul Zulu FX 21). The app is tuned to keep native (off-heap) memory bounded, so launch it with the recommended JVM flags:

java -Xmx512m -XX:MaxDirectMemorySize=128m \
  -Djdk.nio.maxCachedBufferSize=262144 \
  -XX:+UseStringDeduplication -XX:G1PeriodicGCInterval=10000 \
  --add-modules javafx.controls,javafx.swing \
  -jar target/jfxssh.jar

On macOS you can double-click run-mac.command (place it next to jfxssh.jar); it applies the flags above. See docs/RUN_MACOS.md for details.

Project structure

com.xxx.jfxssh
├── launcher    app entry point
├── ui          JavaFX views (tree / terminal / dialogs / sftp / forward / ...)
├── service     business logic (interfaces + Impl)
├── ssh         SSH / SFTP / port-forward transport (Apache MINA SSHD)
├── terminal    JediTerm ⇄ SSH stream adapter
├── storage     SQLite database, repositories, entities
└── common      config, i18n, security primitives

Layering is strict: UI → Service → Repository → Database. The ssh and terminal modules are infrastructure called by services; the UI never touches them directly.

Documentation

Doc Contents
PRODUCT_REQUIREMENT.md Product scope and delivery status
ARCHITECTURE.md Layering, modules, terminal & security design
DATABASE.md SQLite schema
API.md Service-layer interfaces
I18N.md Internationalization scheme
UI_DESIGN.md UI layout and behavior
CODING_STANDARDS.md Coding conventions
RUN_MACOS.md macOS run & memory notes
TASKS.md Final feature / delivery status

License

MIT © 2026 HaTin


中文说明

JFX SSH Client 是一款免费、开源、跨平台的 SSH 客户端(支持 Windows / macOS / Linux),基于 JavaFX 开发。它把**连接管理、终端模拟器、SFTP 文件传输、端口转发(本地 / 远程 / 动态 SOCKS 代理)**集成在一个桌面应用里,是 XShell、FinalShell、MobaXterm、SecureCRT、PuTTY 的轻量级开源替代品。

关键词:SSH 客户端 · 开源 SSH 客户端 · 跨平台 SSH 工具 · 终端模拟器 · SFTP 客户端 · 端口转发 · SSH 隧道 · SOCKS 代理 · 远程服务器管理 · JavaFX SSH · XShell / FinalShell / MobaXterm 替代品 · 国产开源 SSH 工具

功能特性

  • 连接管理 —— 新建 / 编辑 / 删除 / 复制连接,支持可嵌套分组,数据存于 SQLite。
  • SSH 认证 —— 密码与公钥两种方式。私钥采用粘贴内容并加密入库(可带口令),不再以文件路径引用。
  • 终端 —— 多标签、UTF-8、完整 ANSI / 256 色、回滚缓冲,基于 JediTerm 内核;底部独立输入框解决 macOS 下中文输入法问题。
  • SFTP —— 本地 ⇄ 远程双栏文件管理器,并发传输、进度 / 速度 / 取消、递归文件夹上传、同名覆盖确认(含「全部覆盖 / 全部跳过」)。
  • 端口转发 —— 本地(-L)、远程(-R)、动态 SOCKS(-D)。规则按连接持久化,关窗后后台继续运行,可在连接成功时自动启动;支持一键全部启动 / 全部停止
  • 安全 —— 凭据用主密码加密:PBKDF2-HMAC-SHA256(60 万次迭代)→ AES-256-GCM。主密码不入库,派生密钥仅驻内存。
  • 主题与多语言 —— 浅色 / 深色主题、English / 简体中文,均可实时切换、无需重启。
  • 主机密钥校验 —— known_hosts TOFU,指纹变更时告警。

技术栈

Java 21 · JavaFX 21 · Apache MINA SSHD · JediTerm · SQLite · Jackson · SLF4J/Logback · Maven · JUnit 5

构建

需要 JDK 21,产物为 target/jfxssh.jar

mvn clean package          # 构建 + 跑测试
mvn -DskipTests package    # 仅构建

运行

JavaFX 需在模块路径上,推荐使用自带 JavaFX 的 JDK(如 Azul Zulu FX 21)。应用针对堆外内存做了调优,请带推荐 JVM 参数启动

java -Xmx512m -XX:MaxDirectMemorySize=128m \
  -Djdk.nio.maxCachedBufferSize=262144 \
  -XX:+UseStringDeduplication -XX:G1PeriodicGCInterval=10000 \
  --add-modules javafx.controls,javafx.swing \
  -jar target/jfxssh.jar

macOS 下可双击 run-mac.command(与 jfxssh.jar 放同一目录),已内置上述参数。详见 docs/RUN_MACOS.md

许可证

MIT © 2026 HaTin

About

Free open-source cross-platform SSH client built with JavaFX — terminal, SFTP and port forwarding in one app. 开源跨平台 SSH 客户端(终端/SFTP/端口转发)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages