Skip to content
Cyrus-HackmanPublic

About

A polished, native-feeling GTK3 desktop application for Deepin OS (and any Linux system) that makes SSH terminal connections and SSHFS filesystem mounting simple, visual, and colorful — no complex terminal commands required.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

SSHBridge

Python 3.9+ GTK 3.0 Deepin OS License MIT

A polished, native-feeling GTK3 desktop application for Deepin OS (and any Linux system) that makes SSH terminal connections and SSHFS filesystem mounting simple, visual, and colorful — no complex terminal commands required.

Created by Cyrus


🌟 Highlights & Key Features

  • 💻 Interactive SSH Sessions: Launch single-click terminal sessions using your system's default terminal emulator (deepin-terminal, xterm, gnome-terminal, etc.).
  • 🗄 SSHFS Remote Mounting: Mount remote filesystems (servers, NAS, Android Termux) directly into your local filesystem and open them in your file manager (dde-file-manager, nautilus, dolphin).
  • 📱 Android Termux Support: Out-of-the-box support for Termux phones over WiFi/LAN with default port 8022 and automatic remote sftp-server path detection.
  • 🔐 Non-Interactive Password Support: Optional password authentication via secure password_stdin piping, as well as passwordless SSH key authentication.
  • 📂 Smart Path Normalization: Automatically converts paths like ~phone into ~/phone (/home/username/phone) to prevent mount location errors.
  • ✨ Vibrant Glassmorphic UI: High-contrast modern dark ocean theme with glowing action buttons and real-time status indicators.
  • 🛡 Security First: No shell=True, safe subprocess argument passing, no stored plain-text passwords on disk, and rootless FUSE mounts.
  • ⚡ Live Mount Monitoring: Automatically checks /proc/mounts and cleans up stale/broken connection endpoints (ENOTCONN).

🎨 Interface Overview

┌─────────────────────────────────────────────────────────────┐
│ 🌐 SSHBridge                       SSH & SSHFS Manager      │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  SSHBridge                                                  │
│  Connect to remote machines via SSH or mount them with SSHFS│
│                                                             │
│  ┌──────────────────┐  ┌──────────────────┐               │
│  │       💻         │  │       🗄         │               │
│  │       SSH        │  │      SSHFS        │               │
│  │ Open an          │  │ Mount a remote    │               │
│  │ interactive      │  │ filesystem and    │               │
│  │ terminal session │  │ browse it locally │               │
│  └──────────────────┘  └──────────────────┘               │
│                                                             │
│  Active Mounts                                             │
│  🟢 Phone Storage      u0_a413@10.134.140.19:/data/...     │
│                        Local: /home/cyrus/phone            │
│                        [📁 Open Files]   [⏏ Unmount]        │
│                                                             │
│  Saved Connections           [+ SSH]  [+ SSHFS]           │
│  🖥 Termux Phone        u0_a413@10.134.140.19:8022        │
│  🖥 Production Server   ubuntu@192.168.1.100:22            │
│                                                             │
└─────────────────────────────────────────────────────────────┘

🚀 Quick Start

Run Without Installation

git clone https://github.com/Cyrus/sshbridge.git
cd sshbridge
python3 -m sshbridge

Install locally (User installation, no sudo required)

chmod +x build.sh
./build.sh

SSHBridge will be installed to ~/.local/bin/sshbridge and added to your application launcher.

System-wide Installation (Requires sudo)

./build.sh --system

📱 Termux (Android Phone) Mounting Guide

  1. Open Termux on your phone and install OpenSSH:
    pkg update && pkg install openssh
  2. Set a password for your Termux user:
    passwd
  3. Find your phone's WiFi IP address:
    ifconfig
  4. Start the SSH server in Termux:
    sshd
  5. Open SSHBridge on your desktop, choose SSHFS, and enter:
    • Host / IP: Your phone's IP (e.g. 10.134.140.19)
    • Username: Your Termux username (e.g. u0_a413 — find it by typing whoami in Termux)
    • Password: Your Termux password
    • Port: 8022
    • Remote Path: /data/data/com.termux/files/home (or /sdcard for internal storage)
    • Local Mount: ~/phone
  6. Click ⛰ Mount & Open Files.

🛠 Technology Stack

Component Technology
Language Python 3.9+
UI Toolkit GTK3 via PyGObject (python3-gi)
Styling Custom GTK CSS (Obsidian Ocean Dark Theme)
Config Persistence JSON storage in ~/.config/sshbridge/
SSH Client System ssh (OpenSSH)
SSHFS Backend System sshfs + fusermount
Mount Monitor Live /proc/mounts polling via GLib timer

🧪 Testing

SSHBridge includes a comprehensive unit test suite covering input validation, path normalization, and subprocess argv safety contracts.

python3 -m unittest discover -s sshbridge/tests -v

All 61 unit tests pass with 100% success rate.


📂 Project Structure

sshbridge/
├── sshbridge/                  # Python core package
│   ├── __init__.py             # Version metadata
│   ├── __main__.py             # Executable entry point
│   ├── app.py                  # Gtk.Application manager
│   ├── window.py               # Main GTK window & navigation
│   ├── core/
│   │   ├── config.py           # Connection storage & serialization
│   │   ├── detector.py         # System tool auto-detection
│   │   ├── mount_monitor.py    # Live mount polling daemon
│   │   ├── ssh_runner.py       # SSH terminal command launcher
│   │   ├── sshfs_runner.py     # SSHFS mount/unmount & fallback runner
│   │   └── validator.py        # Input validation & path normalizer
│   ├── pages/
│   │   ├── home.py             # Home dashboard
│   │   ├── ssh_form.py         # SSH connection form
│   │   └── sshfs_form.py       # SSHFS connection form
│   ├── widgets/
│   │   ├── connection_card.py  # Connection item card
│   │   ├── mount_row.py        # Active mount status widget
│   │   └── notification.py     # In-app alert bar
│   ├── resources/
│   │   └── style.css           # Premium GTK CSS design system
│   └── tests/
│       ├── test_validator.py   # Validator & path normalizer tests
│       ├── test_ssh_runner.py  # SSH command runner tests
│       └── test_sshfs_runner.py # SSHFS command runner tests
├── data/
│   ├── com.deepin.sshbridge.desktop  # Desktop launcher entry
│   └── icons/hicolor/scalable/apps/
│       └── sshbridge.svg             # Application SVG icon
├── build.sh                    # Installation script
├── uninstall.sh                # Uninstallation script
├── requirements.txt            # System dependencies notes
└── README.md                   # Project documentation

👤 Author

Cyrus


📜 License

This project is licensed under the MIT License — free to use, modify, and share.

About

A polished, native-feeling GTK3 desktop application for Deepin OS (and any Linux system) that makes SSH terminal connections and SSHFS filesystem mounting simple, visual, and colorful — no complex terminal commands required.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages