{"id":15687335,"url":"https://github.com/nwtgck/handy-sshd","last_synced_at":"2025-05-07T03:01:56.803Z","repository":{"id":187104642,"uuid":"676306307","full_name":"nwtgck/handy-sshd","owner":"nwtgck","description":"Portable SSH Server","archived":false,"fork":false,"pushed_at":"2025-03-26T11:29:35.000Z","size":150,"stargazers_count":22,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-26T12:30:50.918Z","etag":null,"topics":["cli","ssh","ssh-server"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nwtgck.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":"2023-08-08T22:58:27.000Z","updated_at":"2025-03-26T11:28:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"99bde69b-d1e6-43d8-8936-f4ffe3b97811","html_url":"https://github.com/nwtgck/handy-sshd","commit_stats":null,"previous_names":["nwtgck/handy-sshd"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhandy-sshd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhandy-sshd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhandy-sshd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Fhandy-sshd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwtgck","download_url":"https://codeload.github.com/nwtgck/handy-sshd/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804208,"owners_count":21806769,"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":["cli","ssh","ssh-server"],"created_at":"2024-10-03T17:47:32.822Z","updated_at":"2025-05-07T03:01:55.741Z","avatar_url":"https://github.com/nwtgck.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# handy-sshd\n[![CI](https://github.com/nwtgck/handy-sshd/actions/workflows/ci.yml/badge.svg)](https://github.com/nwtgck/handy-sshd/actions/workflows/ci.yml)\n\nPortable SSH Server\n\n## Install on Ubuntu/Debian\n\n```bash\nwget https://github.com/nwtgck/handy-sshd/releases/download/v0.4.2/handy-sshd-0.4.2-linux-amd64.deb\nsudo dpkg -i handy-sshd-0.4.2-linux-amd64.deb \n```\n\n## Install on Mac\n\n```bash\nbrew install nwtgck/handy-sshd/handy-sshd\n```\n\nGet more executables in [the releases](https://github.com/nwtgck/handy-sshd/releases).\n\n## Examples\n\n```bash\n# Listen on 2222 and accept user name \"john\" with password \"mypass\"\nhandy-sshd -p 2222 -u john:mypass\n```\n\n```bash\n# Listen on 2222 and accept user name \"john\" without password\nhandy-sshd -p 2222 -u john:\n```\n\n```bash\n# Listen on 2222 and accept users \"john\" and \"alice\" without password\nhandy-sshd -p 2222 -u john: -u alice:\n```\n\n```bash\n# Listen on unix domain socket\nhandy-sshd --unix-socket /tmp/my-unix-socket -u john:\n```\n\n## Features\nAn SSH client can use\n* Shell/Interactive shell\n* Local port forwarding (ssh -L)\n* Remote port forwarding (ssh -R)\n* [SOCKS proxy](https://wikipedia.org/wiki/SOCKS) (dynamic port forwarding)\n* SFTP\n* [SSHFS](https://wikipedia.org/wiki/SSHFS)\n* Unix domain socket (local/remote port forwarding)\n\nAll features are enabled by default. You can allow only some of them using permission flags.\n\n## Permissions\nThere are several permissions:\n* --allow-direct-streamlocal\n* --allow-direct-tcpip\n* --allow-execute\n* --allow-sftp\n* --allow-streamlocal-forward\n* --allow-tcpip-forward\n\n**All permissions are allowed when nothing is specified.** The log shows \"allowed: \" and \"NOT allowed: \" permissions as follows:\n\n```console\n$ handy-sshd -u \"john:\"\n2023/08/11 11:40:44 INFO listening on :2222...\n2023/08/11 11:40:44 INFO allowed: \"tcpip-forward\", \"direct-tcpip\", \"execute\", \"sftp\", \"streamlocal-forward\", \"direct-streamlocal\"\n2023/08/11 11:40:44 INFO NOT allowed: none\n```\n\nFor example, specifying `--allow-direct-tcpip` and `--allow-execute` allows only them:\n\n```console\n$ handy-sshd -u \"john:\" --allow-direct-tcpip --allow-execute\n2023/08/11 11:41:03 INFO listening on :2222...\n2023/08/11 11:41:03 INFO allowed: \"direct-tcpip\", \"execute\"\n2023/08/11 11:41:03 INFO NOT allowed: \"tcpip-forward\", \"sftp\", \"streamlocal-forward\", \"direct-streamlocal\"\n```\n\n## --help\n\n```\nPortable SSH server\n\nUsage:\n  handy-sshd [flags]\n\nExamples:\n# Listen on 2222 and accept user name \"john\" with password \"mypass\"\nhandy-sshd -u john:mypass\n\n# Listen on 22 and accept the user without password\nhandy-sshd -p 22 -u john:\n\nPermissions:\nAll permissions are allowed by default.\nFor example, specifying --allow-direct-tcpip and --allow-execute allows only them.\n\nFlags:\n      --allow-direct-streamlocal    client can use Unix domain socket local forwarding (ssh -L)\n      --allow-direct-tcpip          client can use local forwarding (ssh -L) and SOCKS proxy (ssh -D)\n      --allow-execute               client can use shell/interactive shell\n      --allow-sftp                  client can use SFTP and SSHFS\n      --allow-streamlocal-forward   client can use Unix domain socket remote forwarding (ssh -R)\n      --allow-tcpip-forward         client can use remote forwarding (ssh -R)\n  -h, --help                        help for handy-sshd\n      --host string                 SSH server host to listen (e.g. 127.0.0.1)\n  -p, --port uint16                 port to listen (default 2222)\n      --shell string                Shell\n      --unix-socket string          Unix domain socket to listen\n  -u, --user stringArray            SSH user name (e.g. \"john:mypass\")\n  -v, --version                     show version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwtgck%2Fhandy-sshd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwtgck%2Fhandy-sshd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwtgck%2Fhandy-sshd/lists"}