Skip to content

ImKKingshuk/USBoverSSH

Repository files navigation

USBoverSSH

The Ultimate USB over SSH Solution

Unified USB Device Sharing Platform

βš› Rust-Powered βš› TUI-First βš›

Secure USB Tunneling, Device Management, and Cross-Platform Support in One Framework

USBoverSSH is a unified USB device sharing and tunneling toolkit built entirely in Rust. It provides a comprehensive TUI workspace alongside a powerful CLI, enabling users to perform USB device enumeration, secure SSH tunneling, USB/IP protocol implementation, and device attachment from a single modular framework.

The platform integrates advanced capabilities including cross-platform USB device enumeration (Linux sysfs, macOS/Windows via nusb), SSH tunneling with russh, USB/IP server implementation (Linux), device filtering by multiple criteria, persistent connections with auto-reconnect, daemon mode for background operation, and kernel module management. USBoverSSH supports modern USB ecosystems across Linux (full server + client), macOS (client only), and Windows (client only).

With comprehensive device filtering (bus ID, VID:PID, serial, product name, device class), multi-host configuration management, VHCI attachment/detachment (Linux), and an interactive TUI with tabbed interface, USBoverSSH enables users to securely share and access USB devices across machines within one unified environment.

Connect your devices and begin advanced USB over SSH tunneling and management.


Platform Version License


Installation

Quick Start

TUI (Default)

usboverssh

CLI (Headless)

# List local USB devices
usboverssh list

Product Priority

  • TUI is the main product and default experience. Use usboverssh for day-to-day device management, host connections, and operator-guided operations.
  • CLI is the secondary surface. Use usboverssh list, attach, detach, and other commands for quick one-off tasks, automation.

TUI Keybindings

Action Keys
Quit q or Esc
Navigate panes Tab / Shift+Tab
Navigate items Arrow keys or j/k
Select/Activate Enter
Attach device a
Detach device d
Refresh devices r or F5
Connect to host c
Show hosts panel h
Toggle status panel s
Help ? or F1

Features

Device Management

  • βœ… List local USB devices (all, with class filtering)
  • βœ… List remote USB devices via SSH
  • βœ… Device information retrieval (bus ID, VID:PID, class, speed, manufacturer, product, serial)
  • βœ… Attach remote USB devices (by VID:PID, product name, bus ID)
  • βœ… Detach attached devices (specific or all)
  • βœ… Show currently attached devices (VHCI status)
  • βœ… Device filtering by multiple criteria
  • βœ… Persistent mode with auto-reconnect
  • βœ… Daemon mode for background operation

USB/IP Server

  • βœ… Start USB/IP server (Linux only)
  • βœ… TCP and Unix socket listeners
  • βœ… Device export with filtering
  • βœ… Export all devices option
  • βœ… Device list request handling
  • βœ… Import (attach) request handling
  • βœ… Kernel module auto-loading (Linux)

SSH Tunneling

  • βœ… SSH connection establishment
  • βœ… Key-based authentication
  • βœ… Remote command execution
  • βœ… Unix socket forwarding
  • βœ… Connection state management
  • βœ… Keep-alive support
  • βœ… Server host key verification

Configuration

  • βœ… TOML-based configuration
  • βœ… Named host configurations
  • βœ… SSH settings (identity file, config file, agent forwarding)
  • βœ… General settings (reconnect delay, timeout, verbosity)
  • βœ… Logging settings (level, format, file, color)
  • βœ… TUI settings (refresh interval, mouse, theme, show serial/speed)
  • βœ… Auto-attach rules with device filters
  • βœ… Configuration init, show, path, add-host commands

Platform Support

  • βœ… Linux: Full support (server + client) with kernel modules
  • βœ… macOS: Client only (device enumeration via nusb)
  • βœ… Windows: Client only (device enumeration via nusb)
  • βœ… Kernel module checking and loading (Linux)
  • βœ… VHCI port management (Linux)
  • βœ… Device binding/unbinding (Linux)

TUI Features

  • βœ… Tabbed interface (Local Devices, Remote Devices, Attached, Hosts)
  • βœ… Device lists with status indicators
  • βœ… Host connection management
  • βœ… Attach/detach operations
  • βœ… Help popup
  • βœ… Connect dialog
  • βœ… Status bar with keybinding hints
  • βœ… Auto-refresh
  • βœ… Mouse support

Requirements

  • OS: macOS, Linux, Windows
  • Linux Server: Kernel with USB/IP support (usbip-core, usbip-host modules)
  • Linux Client: Kernel with VHCI support (vhci-hcd module)
  • macOS/Windows: No special requirements (client only)
  • SSH

Platform Support

Linux (Full Support)

  • USB device enumeration via sysfs
  • USB/IP server functionality
  • VHCI client attachment
  • Kernel module management (usbip-host, vhci-hcd)
  • Device binding/unbinding
  • All features supported

macOS (Client Only)

  • USB device enumeration via nusb
  • SSH tunneling and remote device listing
  • USB/IP client functionality (userspace)
  • No server functionality

Windows (Client Only)

  • USB device enumeration via nusb
  • SSH tunneling and remote device listing
  • USB/IP client functionality (userspace)
  • No server functionality

Device Classes Supported

USB device classes recognized and filtered:

  • Audio, Communication (COM), HID, Physical, Image, Printer, Mass Storage, Hub
  • CDC Data, SmartCard, Content Security, Video, Personal Healthcare, Audio/Video
  • Billboard, USB Type-C Bridge, Diagnostic, Wireless Controller
  • Miscellaneous, Application Specific, Vendor Specific

Disclaimer

USBoverSSH: The Ultimate USB over SSH Solution is developed for USB device sharing and tunneling purposes. It should be used responsibly and in compliance with all applicable laws and regulations. The developer of this tool is not responsible for any misuse or illegal activities conducted with this tool.

USB device sharing should only be performed with proper authorization and understanding of the implications. Accessing remote USB devices may affect system functionality and security. Always ensure proper authorization before using USBoverSSH for device sharing. Always adhere to ethical practices and comply with all applicable laws and regulations.

License

This project is licensed under the GPL-3.0-only License.

Happy USB Tunneling with USBoverSSH! πŸš€

About

USBoverSSH - Seamlessly Connect USB Devices Over SSH! πŸš€βœ¨ Leverage the power of USBoverSSH to establish secure connections between USB devices and remote hosts. Effortlessly bridge the gap between local and remote USB devices, ensuring smooth communication over SSH. πŸŒπŸ”’ Embark on a journey of secure USB connectivity with USBoverSSH.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages