{"id":15859040,"url":"https://github.com/liamg/vault-ssh-playground","last_synced_at":"2025-08-30T16:13:29.507Z","repository":{"id":74990528,"uuid":"175449610","full_name":"liamg/vault-ssh-playground","owner":"liamg","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-15T17:08:10.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T01:34:30.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liamg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-03-13T15:33:36.000Z","updated_at":"2023-09-08T17:51:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1781611-871d-4847-b451-2a92ad085785","html_url":"https://github.com/liamg/vault-ssh-playground","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"5401dd3a0eabce766c9ea613a9a3648d7cfbb132"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liamg/vault-ssh-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fvault-ssh-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fvault-ssh-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fvault-ssh-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fvault-ssh-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liamg","download_url":"https://codeload.github.com/liamg/vault-ssh-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fvault-ssh-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272873343,"owners_count":25007512,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-05T21:03:08.171Z","updated_at":"2025-08-30T16:13:29.490Z","avatar_url":"https://github.com/liamg.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vault Fun\n\nThis includes two containers, one running Vault and another running sshd on Ubuntu. \n\nThe sshd container has been configured to automatically create non-existant users on SSH login. This currently requires the user to initially attempt to authenticate twice, as the first attempt sshd will not have information about the uid/guid of the freshly created user.\n\n## Setup\n\n```\ndocker-compose up --build\n```\n\nand in separate terminal:\n\n```\n./init.sh\n```\n\nthen you can\n\n```\nssh liam-2001@127.0.0.1 -p2222\n```\n\n(you will need to attempt to ssh in twice, as the first attempt will always fail)\n\n\n### Configuring SSH OTP\n\nNow you can configure vault to provide OTPs for ssh:\n\n```bash\nvault secrets enable ssh\nvault write ssh/roles/otp_key_role key_type=otp default_user=myusername allowed_users=myusername cidr_list=0.0.0.0/0\n```\n\nNext, you can get an OTP with:\n\n```bash\nvault write ssh/creds/otp_key_role ip=127.0.0.1\n```\n\nThe key field in the above is what you need.\n\nNow we can try and ssh into the other container with that password:\n\n```\nssh myusername@127.0.0.1 -p2222\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Fvault-ssh-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliamg%2Fvault-ssh-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Fvault-ssh-playground/lists"}