Hyperssh
Reference for the Hyperssh CLI: SSH, SSHFS, and RDP access over HyperDHT.
Hyperssh routes SSH-style access through HyperDHT. This page documents the public binaries installed by hyperssh: hyperssh and hyperssh-fuse.
System support
Desktop only: macOS, Linux, and Windows are supported. Hyperssh is not available on Android or iOS.
Install
npm i -g hypersshFor end-to-end setups, the remote side also needs Hypertele so it can expose SSH, SSHFS-backed traffic, or RDP over HyperDHT:
npm i -g hypertelePrerequisites
Hyperssh does not generate its own keys. The workflows below need a server seed (for hypertele-server on the remote) and, optionally, a client identity.json. Generate them with hyper-cmd-utils:
npm i -g hyper-cmd-utils
# Server seed (used as --seed for hypertele-server)
hyper-cmd-util-keygen --gen_seed
# Optional: client identity file (used as -i for hyperssh / hyperssh-fuse)
hyper-cmd-util-keygen --gen_keypair identity.jsonhypertele-server prints the server public key on start; use that as -s for hyperssh and hyperssh-fuse.
hyperssh
Open an SSH session through a peer exposed over HyperDHT.
hyperssh -s <peer-key-or-alias> [options]Flags:
-s <peer-key-or-alias>: peer key or resolved host alias to connect to. Default: required-u <username>: remote username. Default: the current local OS username-i <identity.json>: identity file to use for the client. Default: off-e <ssh-command>: remote command to run instead of opening an interactive shell. Default: interactive SSH session--rdp: open a local RDP proxy instead of spawningssh. Default: off--help: show help.
Notes:
- In normal mode, Hyperssh binds an ephemeral local port and runs
ssh -p <port> <user>@localhost. - In
--rdpmode, Hyperssh exposes a local proxy on port3389for an RDP client.
Example:
hyperssh -s <peer-key> -u alicehyperssh-fuse
Mount a remote filesystem locally through SSHFS over HyperDHT.
hyperssh-fuse -s <peer-key-or-alias> -m <mountpoint> [options]Flags:
-s <peer-key-or-alias>: peer key or resolved host alias to connect to. Default: required-u <username>: remote username. Default: the current local OS username-i <identity.json>: identity file to use for the client. Default: off-m <mountpoint>: local mountpoint for the remote filesystem. Default: required--help: show help.
Notes:
hyperssh-fuseshells out tosshfs, so the local machine must already have SSHFS installed.- As with
hyperssh, the CLI creates a local ephemeral port and tunnels SSH traffic through it.
Example:
hyperssh-fuse -s <peer-key> -u alice -m ~/mnt/remoteCommon workflows
SSH into a peer by key or alias
On the remote machine, expose the local SSH service first:
hypertele-server --seed <server-seed> -l 22If you already know the peer key, connect directly:
hyperssh -s <peer-key> -u aliceIf you manage host aliases in your HyperDHT tooling, use the alias instead:
hyperssh -s work-server -u aliceRun one remote command without opening an interactive shell
Use -e to pass a single command through the SSH session:
hyperssh -s <peer-key> -u alice -e "uname -a"Mount a remote filesystem locally
Expose the remote SSH service first if it is not already running:
hypertele-server --seed <server-seed> -l 22Create a mountpoint and then use hyperssh-fuse:
mkdir -p ~/mnt/remote
hyperssh-fuse -s <peer-key> -u alice -m ~/mnt/remoteReach a remote desktop through HyperDHT
Expose the remote machine's RDP service with hypertele-server:
hypertele-server --seed <server-seed> -l 3389Then open the local RDP proxy:
hyperssh --rdp -s <peer-key>Connect your RDP client to localhost:3389.