SX (SSH eXchange) is a modern, cross-platform file transfer system that enables seamless file transfers between remote SSH sessions and local machines without requiring separate connections or re-authentication.
- π Blazing Fast - Native .NET performance with progress bars
- π Secure - Uses SSH reverse tunnels for encrypted transfers
- π Cross-Platform - Works on Windows, Linux, and macOS
- π Beautiful UI - Rich console output with progress indicators and file tables
- π― Simple - Just three commands:
sxd(download),sxu(upload),sxls(list) - β‘ Tab Completion - Smart shell completion for remote file paths
- π Directory Browsing - Explore remote directories with file sizes and dates
- π¨ No Dependencies - Self-contained executables
Setup: SX.Server runs on your local workstation, SX.Client runs on remote servers you SSH into.
Workflow:
- Start
sx-serveron your workstation - SSH with reverse tunnel:
ssh -R 53690:localhost:53690 user@server - From within your SSH session, use:
sxd filename(download from workstation),sxu filename(upload to workstation),sxls(list workstation files)
Note: All commands below are run from within your SSH session on the remote server. From this perspective, "download" means getting files from your local workstation, and "upload" means sending files back to your workstation.
# List files from your local workstation
$ sxls
ββββββββ¬ββββββββββββββββββ¬βββββββββββ¬βββββββββββββββ
β Type β Name β Size β Modified β
ββββββββΌββββββββββββββββββΌβββββββββββΌβββββββββββββββ€
β DIR β projects β - β 2h ago β
β FILE β presentation.pdfβ 2.4 MB β yesterday β
β FILE β data.csv β 156.7 KB β 3d ago β
ββββββββ΄ββββββββββββββββββ΄βββββββββββ΄βββββββββββββββ
# Download 'presentation.pdf' from your local workstation
$ sxd presentation.pdf
π₯ Downloading: presentation.pdf (2.4 MB)
ββββββββββββββββββββββββββββββββββββββββ 100% | 2.4 MB/s | 00:00:01
# Upload from remote machine to your workstation
$ sxu myfile.txt
π€ Uploading: myfile.txt (45.2 KB)
ββββββββββββββββββββββββββββββββββββββββ 100% | 1.2 MB/s | 00:00:01
β
Upload completed successfully!Option A: Via Snap
# On your local workstation:
sudo snap install sx-server --classic
# On remote servers:
sudo snap install sx-client --classic
# Create command aliases (one-time setup on remote servers):
# Note: Auto-aliases are pending approval - these commands will be automatic soon!
sudo snap alias sx-client.sxd sxd
sudo snap alias sx-client.sxu sxu
sudo snap alias sx-client.sxls sxlsOption B: Via .NET Tool
This option requires .NET 9.0 or later. If you don't have it installed:
Ubuntu/Debian:
# Ubuntu 24.10
sudo apt update && sudo apt install dotnet-sdk-9.0
# Ubuntu 24.04, 22.04, 20.04 (requires backports PPA)
sudo add-apt-repository ppa:dotnet/backports
sudo apt update && sudo apt install dotnet-sdk-9.0Other Linux/macOS/Windows:
See Microsoft's .NET 9 installation guide
Verify installation:
dotnet --version # Should show 9.x.xInstall via .NET tool:
# On your local workstation:
dotnet tool install -g SX.Server
# On remote servers:
dotnet tool install -g SX.ClientOption C: Build from Source
Note: Requires .NET 9.0 SDK
git clone https://github.com/Memphizzz/sx
cd sx
dotnet pack SX.Server --configuration Release --output ./packages
dotnet tool install --global --add-source ./packages SX.ServerThe setup scripts are included with the client package:
For Bash/Zsh:
# From the package
source ~/.dotnet/tools/.store/sx.client/1.x.x/sx.client/1.x.x/scripts/setup-sx-commands.sh
# Or download from GitHub if you prefer
curl -sL https://raw.githubusercontent.com/Memphizzz/SX/main/setup-sx-commands.sh | bashFor Fish Shell:
# From the package
source ~/.dotnet/tools/.store/sx.client/1.x.x/sx.client/1.x.x/scripts/setup-sx-fish.fish
# Or download from GitHub
curl -sL https://raw.githubusercontent.com/Memphizzz/SX/main/setup-sx-fish.fish | fishOr manually create aliases:
# Add to your shell config (.bashrc, .zshrc, etc.)
alias sxd='~/.dotnet/tools/sx sxd'
alias sxu='~/.dotnet/tools/sx sxu'
alias sxls='~/.dotnet/tools/sx sxls'# Start SX server to serve files from a directory
sx-server --dir ~/Downloads# Connect to remote server with reverse tunnel
ssh -R 53690:localhost:53690 user@remote-server# List files with beautiful table (generates completion cache)
sxls
# Enable tab completion (first time only, after running sxls)
source ~/.sx/sx_completion.bash # or .fish for fish shell
# Download files (with tab completion!)
sxd <TAB> # Shows available files
sxd largefile.zip
# Upload files (shell handles local completion)
sxu mylocal.txt| Command | Description | Example |
|---|---|---|
sxls [path] |
List files and directories | sxls, sxls projects/ |
sxd <remote> [local] |
Download file from server | sxd file.pdf, sxd data.csv backup.csv |
sxu <local> |
Upload file to server | sxu document.pdf |
SX includes intelligent shell completion that updates automatically:
- Run
sxls- Updates completion cache with current server files - Press TAB - Get smart completions:
sxd <TAB>- Complete with downloadable filessxls <TAB>- Complete with directories
Setup completion (one-time):
# Bash
echo "source ~/.sx/sx_completion.bash" >> ~/.bashrc
# Fish
echo "source ~/.sx/sx_completion.fish" >> ~/.config/fish/config.fishsx-server [options]
Options:
-p, --port <port> Port to listen on (default: 53690)
-d, --dir <path> Directory to serve (default: ~/Downloads)
--max-size <size> Maximum file size (default: 10GB)
--no-overwrite Don't overwrite existing files
-h, --help Show help# Custom server port and directory
sx-server --port 9999 --dir /data/shared
# With size limits
sx-server --max-size 1GB --no-overwrite
# Client using custom port
export SX_PORT=9999
sxd file.txt # Client connects to port 9999βββββββββββββββββββ SSH Tunnel βββββββββββββββββββ
β Remote Server ββββββββββββββββββββ€ Local Machine β
β β β β
β sxd/sxu/sxls β Port 53690 β SX.Server β
β (SX.Client) β β β
βββββββββββββββββββ βββββββββββββββββββ
- SX.Core - Core library with protocol, file handling, and utilities
- SX.Server - Server executable (local machine)
- SX.Client - Client commands (remote machine via SSH)
- Protocol - JSON-based communication over TCP
dotnet build
dotnet build --configuration Release# Start server
dotnet run --project SX.Server -- --dir ./test-files
# Test client (in another terminal)
dotnet run --project SX.Client -- sxls
dotnet run --project SX.Client -- sxd testfile.txt- Check if SX server is running locally
- Verify SSH tunnel:
ssh -R 53690:localhost:53690 user@server - Check firewall settings
- Try different port if conflicts occur
# Use different port
dotnet run --project SX.Server -- --port 9999
export SX_PORT=9999
ssh -R 9999:localhost:9999 user@server# Regenerate completion
rm -rf ~/.sx/
sxls # Regenerates completion files
# Re-source completion
source ~/.sx/sx_completion.bashIf you prefer manual setup:
Create wrapper scripts:
mkdir -p ~/.local/bin
# Download command
echo '#!/bin/bash
exec ~/.dotnet/tools/sx sxd "$@"' > ~/.local/bin/sxd
chmod +x ~/.local/bin/sxd
# Upload command
echo '#!/bin/bash
exec ~/.dotnet/tools/sx sxu "$@"' > ~/.local/bin/sxu
chmod +x ~/.local/bin/sxu
# List command
echo '#!/bin/bash
exec ~/.dotnet/tools/sx sxls "$@"' > ~/.local/bin/sxls
chmod +x ~/.local/bin/sxls
# Add to PATH
export PATH="$HOME/.local/bin:$PATH"Fish shell functions:
mkdir -p ~/.config/fish/functions
echo 'function sxd --description "SX Download - Get file from server"
~/.dotnet/tools/sx sxd $argv
end' > ~/.config/fish/functions/sxd.fish
echo 'function sxu --description "SX Upload - Send file to server"
~/.dotnet/tools/sx sxu $argv
end' > ~/.config/fish/functions/sxu.fish
echo 'function sxls --description "SX List - List files on server"
~/.dotnet/tools/sx sxls $argv
end' > ~/.config/fish/functions/sxls.fish# Remove tool
dotnet tool uninstall -g SX.Client
# Remove wrapper scripts
rm -f ~/.local/bin/sxd ~/.local/bin/sxu ~/.local/bin/sxls
# Remove completion
rm -rf ~/.sx/
# Remove shell config additions (manual cleanup)- .NET 9.0 or later (only for .NET Tool installation or building from source; Snap packages bundle everything)
- SSH 2.0 or later (for reverse port forwarding support)
- Upload disconnection detection: Server detects client disconnections during upload with ~1 second delay
- π 1.0.10: Multiple simultaneous client support with request queuing
- π Future: Resume interrupted transfers
- π Future: Directory synchronization
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with .NET 9
- UI powered by Spectre.Console
- JSON handling via Newtonsoft.Json
- Development assistance by Claude (Anthropic)
Made with β€οΈ for seamless SSH file transfers
This software is provided "as is" for development and productivity purposes. While designed with security in mind through SSH tunnels, users are responsible for:
- Ensuring secure SSH configurations
- Validating file transfer permissions
- Implementing appropriate access controls
- Compliance with organizational security policies
Use in production environments is at your own discretion and risk.