GitHub - viktor-silakov/cmux-ssh-here: Spin up a token-auth SSH server and print a cmux deep link to connect over your LAN (npx cmux-ssh-here) · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
viktor-silakov
cmux-ssh-here
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>28 Commits<br>28 Commits
.github/workflows
.github/workflows
assets
assets
.gitignore
.gitignore
LICENSE
LICENSE
README.md
README.md
bin.js
bin.js
package-lock.json
package-lock.json
package.json
package.json
tool.test.mjs
tool.test.mjs
View all files
Repository files navigation
cmux-ssh-here
Share a shell on this machine in one command — no SSH setup, no keys, no passwords.
cmux-ssh-here spins up a throwaway, token-authenticated SSH server and prints a cmux deep link. Send the link to any device on your LAN, open it in cmux, and you're instantly in a terminal on this machine. When you're done, hit Ctrl-C — the server, token, and host key vanish.
npx cmux-ssh-here
That's it. No sshd to configure, no ~/.ssh/authorized_keys to edit, no firewall dance.
New to cmux? cmux is a terminal/workspace app for macOS. The deep link this tool prints opens an SSH session right inside it — so the device you connect from just needs cmux installed.
The terminal turns into a live dashboard — the cmux link, two QR codes (cmux deep link + ssh://), a plain ssh command, a countdown bar for the link's lifetime, and who's connected. Open the link and cmux connects on its own — one click, straight into the shell.
Why you'll like it
⚡ Zero setup — one npx command, no SSH server administration.
🔗 One-click connect — open the printed link on another Mac and cmux drops you straight into the shell.
📲 Works with any SSH client — the dashboard also prints a plain ssh @host -p and a tappable ssh:// deep link, so you can connect from a phone (Termius, Blink, WebSSH), Linux, or Windows — not just cmux.
🔑 No credentials to share — auth is a one-time token baked into the link.
⏳ Self-expiring — the link rotates every 3 minutes; leaked links go stale on their own. Live sessions stay connected.
🎯 One-time mode — --once locks the link to the first device that connects and rejects everyone else.
👀 Live dashboard — see the current link, a countdown bar, and every connected client at a glance.
🧩 Real SSH — full PTY shell, scp/sftp, and the exec channel cmux needs to bootstrap remote workspaces.
🪟 Persistent sessions — when tmux is present, sessions survive disconnects and are shared across connections.
Use cases
💻 Reach your desk machine from the couch — open a shell on your work Mac from another Mac on the same Wi-Fi.
📲 Connect from your phone — tap the ssh:// link or paste the ssh command into any SSH app (Termius, Blink, WebSSH); no cmux required.
👥 Hand a teammate a shell — share the link on the office network for quick pairing or debugging; use --once so only they get in.
🔧 One-off access without setup — debug a box you don't want to permanently open sshd on; close the terminal and the door is gone.
Quick start
# on the machine you want to reach<br>npx cmux-ssh-here
Then open the printed https://cmux.com/deeplink/ssh?… link in cmux on any device on the same network.
How it works
Its own SSH server (ssh2) with an ephemeral host key and token — both live only while the process runs.
The token rides in the deep link's user=; the server accepts only that token, and rotates it every 3 minutes.
cmux deep links deliberately carry no passwords or keys, so the secret is the token itself.
Full PTY shell via node-pty, a raw-pipe exec channel, and a filesystem-backed SFTP server — together they let cmux ssh upload and run its remote helper (a shell-only server isn't enough).
With tmux available, the interactive shell runs inside it: sessions persist, are shared across connections, and the session list (choose-tree) is shown on connect.
Compatibility
Host running npx cmux-ssh-here<br>Supported
macOS
Linux
Windows<br>❌ — needs a...