{"id":20534862,"url":"https://github.com/qbit/aussh","last_synced_at":"2025-08-01T11:06:45.339Z","repository":{"id":136341920,"uuid":"139584779","full_name":"qbit/aussh","owner":"qbit","description":"aussh is an overly simple wrapper script for ssh that aims to maintain a persistent SSH tunnel.","archived":false,"fork":false,"pushed_at":"2018-07-10T13:00:52.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T13:48:00.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-07-03T13:06:38.000Z","updated_at":"2023-02-15T00:48:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"a470e84a-017e-4d53-844f-24415d8fae7e","html_url":"https://github.com/qbit/aussh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Faussh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Faussh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Faussh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Faussh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbit","download_url":"https://codeload.github.com/qbit/aussh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242138821,"owners_count":20078006,"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-11-16T00:28:27.402Z","updated_at":"2025-03-06T03:17:30.869Z","avatar_url":"https://github.com/qbit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aussh\n\naussh is an overly simple wrapper script for ssh that aims to maintain\na persistent SSH tunnel. it monitors and restarts ssh sessions by using\nbuiltin ssh features ServerAliveInterval/ServerAliveCountMax. Intended\nto run with tmux sessions, it's fine for monitoring background tunnels\n\\`ssh -f' though. this code came up since i was looking for a solution\nfor reconnecting all ssh tunnels when resuming from \\`ZZZ(8)'\napm hibernation or changing network.\n\nIt uses ssh(1)/ServerAliveInterval to send a message through the encrypted\nchannel to request a response from the server, and ssh(1)/ServerAliveCountMax\nto set the number of server alive messages which may be sent without ssh(1)\nreceiving any messages back from the server. see ssh_config(5) manpage for\nfuther details.\n\nFor background tunnel -n flag must be used, it prevents reading from\nstdin and ssh(1) does not work if it needs to ask for a password or\npassphase, so for using `ssh -f' is required to use public keys\nautehtication, see ssh-agent(1).\n\nIts usage is straighforward, just requires wrapping ssh(1) options.\n\n### usage\n\n        # start a ssh tunnel\n        $ aussh host -oServerAliveInterval=5 -oServerAliveCountMax=2\n\n        # pushing ssh process to background\n        $ aussh  -oServerAliveInterval=5 -oServerAliveCountMax=2  \\\n                -n -fNL 10587:smtp.example.org:587 host\n\n        # typical use, start a ssh tunnel and reattach a tmux session\n        # using ~/.ssh/config for pulling options:\n\n        Host irc\n        HostName host.org\n        ServerAliveInterval 5\n        ServerAliveCountMax 2\n        RequestTTY yes\n        RemoteCommand tmux attach-session -t irssi || tmux new-session -s irssi\n\n        Finally, $ aussh irc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Faussh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbit%2Faussh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Faussh/lists"}