Show HN: SX – Transfer files from within SSH sessions without reconnecting

2 memphizzz 0 6/23/2025, 5:15:20 AM github.com ↗
I got tired of the constant workflow friction when transferring files over SSH. You know the drill: SSH into a server, find the file you need (often with grep/rg), then either memorize the path or copy it, open another terminal, retype `scp user@server:/long/path/file.log .`, re-authenticate, and finally get your file.

This became especially annoying during log analysis sessions where I'd discover interesting files with `rg "OutOfMemory" .log` and then have to context-switch just to download them.

*What SX does:* SX lets you transfer files directly from within your existing SSH session using reverse tunnels. No re-authentication, no retyping connection details, no context switching.

I know VSCode can remotely open files with `code filename`, but this works for larger files, binaries, and when you actually need the file locally (not just to view/edit).

*How it works:* - Start SX server locally: `sx-server --dir ~/Downloads` - SSH with reverse tunnel: `ssh -R 53690:localhost:53690 user@server` - Use three commands: `sxd` (download), `sxu` (upload), `sxls` (list local files)

*Technical details:* Built in .NET 9 with a simple JSON protocol over TCP through SSH reverse tunnels. The client (on remote server) talks to your local server through the existing SSH connection. No additional ports, authentication, or network setup needed.

I built this primarily for my own workflow pain, but figured others might find it useful. It's cross-platform (Windows/Linux/macOS) and includes tab completion for remote files.

The code is straightforward – happy to discuss the implementation or get feedback on the approach.

Comments (0)

No comments yet