{"id":16805958,"url":"https://github.com/pkgw/stund","last_synced_at":"2025-04-04T22:05:07.778Z","repository":{"id":31757782,"uuid":"128785096","full_name":"pkgw/stund","owner":"pkgw","description":"An ssh tunnel daemon.","archived":false,"fork":false,"pushed_at":"2025-03-10T14:28:36.000Z","size":1045,"stargazers_count":46,"open_issues_count":5,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:04:37.935Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pkgw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-09T14:30:36.000Z","updated_at":"2025-03-10T14:28:33.000Z","dependencies_parsed_at":"2023-10-02T16:47:19.087Z","dependency_job_id":"8aaf7d42-8754-4fa9-b7e9-617ce069df1d","html_url":"https://github.com/pkgw/stund","commit_stats":{"total_commits":354,"total_committers":8,"mean_commits":44.25,"dds":0.6468926553672316,"last_synced_commit":"610d75476dcaff8f2dc242e28f84988de530e51d"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fstund","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fstund/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fstund/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fstund/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkgw","download_url":"https://codeload.github.com/pkgw/stund/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256110,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T09:49:44.881Z","updated_at":"2025-04-04T22:05:07.754Z","avatar_url":"https://github.com/pkgw.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stund — an SSH tunnel daemon\n\nStund (“stunned”), an SSH tunnel daemon, will maintain SSH tunnels in the\nbackground for you. It is convenient when you are often logging in to remote\nsystems that require you to type in a password every time you connect.\n\n[![](http://meritbadge.herokuapp.com/stund)](https://crates.io/crates/stund)\n\nIf you have a [Rust](https://rust-lang.org/) toolchain available, you can\ninstall `stund` by running\n\n```\ncargo install stund\n```\n\n[See below](#installation) for more detailed installation instructions.\n\n\n## Usage\n\nProbably all you ever need to run is:\n\n```\nstund open login.mydomain.org\n```\n\nThis will more-or-less run `ssh login.mydomain.org` in such a way that the\ncommand will disconnect from your terminal after you type in your passwords.\n**If you use\n[SSH connection multiplexing](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing)**,\nsubsequent SSH connections to `login.mydomain.org` will reuse the\npre-authenticated connection, avoiding repeated password entry.\n\nIf you don't use SSH connection multiplexing, stund is basically pointless.\n\nIf you would normally give SSH more arguments when connecting to the your\nhost, set up your\n[SSH config file](https://en.wikibooks.org/wiki/OpenSSH/Client_Configuration_Files)\nwith the necessary entries. Virtually any option that appears on the command\nline can be automated through SSH configuration. **You should probably set\n`ServerAliveInterval = 120` for tunnels to be maintained with stund.**\n\nOther stund commands:\n\n```\nstund close login.mydomain.org  # close an existing tunnel\nstund status                    # report status of tunnels\nstund exit                      # shut down the background daemon\n```\n\n(Yes, stund is basically like running SSH in a\n[GNU screen](https://www.gnu.org/software/screen/) session. But the user\nexperience is a bit nicer, and in writing it I got to learn a lot of exciting\nthings about psuedoterminals and asynchronous I/O with Rust’s\n[Tokio](https://tokio.rs/) framework.)\n\nThe `open` command can optionally exec another command after it finishes, if\nyou run it with the following syntax:\n\n```\nstund open login.mydomain.org -- command arg1 arg2\n```\n\nThis can be useful as a one-liner to open a needed tunnel and log into a host\nlying behind a gateway:\n\n```\nstund open login.mydomain.org -- ssh -J login.mydomain.org myinnerhost\n```\n\nIf the connection to `login.mydomain.org` does not need any user interaction\nto be opened, the explicit invocation of `stund` can be avoided with a proper\nSSH `ProxyCommand` configuration item, as mentioned below.\n\n\n## Installation\n\nFor now, you have to compile stund yourself. But, installing the latest\nversion should be pretty simple:\n\n1. Install the [Rust language](https://www.rust-lang.org/en-US/) toolchain if\n   you don't already have it. In almost all cases the recommended method is to\n   use [rustup.rs](https://rustup.rs/).\n2. Add `$HOME/.cargo/bin` to your `$PATH` if it is not already there.\n3. Run `cargo install -f stund`\n4. Run `stund help` to verify the installation.\n\nYou don’t need to check out this repository unless you want to install\na bleeding-edge version of `stund` rather than the latest release.\n\n\n## Things You Can Do With Multiplexed SSH Tunnels\n\n- If you log into a service that requires you to type your password, you\n  can just type it once in the morning, instead of periodically throughout\n  the day as you accidentally close your “primary” connection!\n- [Open and close port forwards dynamically](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing#Port_Forwarding_After_the_Fact).\n- [Transparently log in to hosts that are inside gateways](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts#Jump_Hosts_--_Passing_Through_a_Gateway_or_Two),\n  so that you can do things like `scp` files without having to make multiple\n  hops.\n\nIf you need to log into hosts that live behind a gateway, *and* the gateway\ndoesn’t require any user interaction for you to login in successfully, you can\nuse stund’s “exec-after-open” functionality to automatically open long-lived\nbackground SSH tunnels with `ProxyCommand` settings that look like this:\n\n```\nHost inner.mydomain\nProxyCommand = stund open --no-input -q login.mydomain.org -- ssh -W inner:%p login.mydomain.org\n```\n\nThe `--no-input` option is needed to prevent `stund` from trying to read\nanything from standard input; otherwise it would consume some of the SSH\ntraffic.\n\n\n## Things Stund Can’t Do\n\nThe big limitation is that `stund` can’t keep your SSH connection alive if you\nsuspend your laptop or switch networks. It’s simply not possible to do this\ndue to the fundamental design of the SSH protocol (namely, that SSH runs over\nlong-lived TCP connections).\n\nIf this is the functionality you want, the best solution of which we are aware\nis [mosh](https://mosh.org/), which uses a sessionless UDP-based protocol\nthat’s bootstrapped over a temporary SSH connection. While this design allows\n`mosh` to overcome some of SSH’s limitations, it means that `mosh` doesn’t\nsupport features like port forwarding and file transfers. Also, `mosh`\nrequires bidirectional UDP traffic between the client and the server, which is\noften disallowed by conservative firewall rules.\n\n\n## Changes\n\nSee [CHANGELOG.md](./CHANGELOG.md) for a list of changes associated with each release.\n\n\n## Copyright and License\n\nStund is copyright its authors and is licensed under the\n[MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkgw%2Fstund","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkgw%2Fstund","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkgw%2Fstund/lists"}