{"id":16199788,"url":"https://github.com/or13/docker-ssh-ca-tutorial","last_synced_at":"2025-06-10T14:11:16.517Z","repository":{"id":95127794,"uuid":"161274707","full_name":"OR13/docker-ssh-ca-tutorial","owner":"OR13","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-04T16:10:32.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T17:48:48.592Z","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/OR13.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":"2018-12-11T03:57:30.000Z","updated_at":"2019-01-04T16:10:33.000Z","dependencies_parsed_at":"2023-05-26T21:00:38.425Z","dependency_job_id":null,"html_url":"https://github.com/OR13/docker-ssh-ca-tutorial","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/OR13%2Fdocker-ssh-ca-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdocker-ssh-ca-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdocker-ssh-ca-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdocker-ssh-ca-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OR13","download_url":"https://codeload.github.com/OR13/docker-ssh-ca-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fdocker-ssh-ca-tutorial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259089154,"owners_count":22803671,"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-10T09:28:12.914Z","updated_at":"2025-06-10T14:11:16.506Z","avatar_url":"https://github.com/OR13.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker ssh ca tutorial\n\nBuild the docker image\n```\nnpm run docker:build\n```\n\nRun the script to generate all certificate and ssh config to make the ca setup work\n```\nnpm run docker:shell\n/workspace/scripts/setup.sh\n```\n\n/!\\ Don't forget to add the ca host's public key (the last line of the output of the script) in your `~/.ssh/known_hosts`, or you'll have to trust the fingerprint manually\n\nSsh into the docker instance\n```\n# In another terminal\nnpm run ssh\n```\n\nTo debug:\n```\nnpm run debug\n```\n\n# CA certificates\nIn this tutorial, we use two CA keypairs:\n- `ca_user` that the host will have to trust to accept the incoming ssh connection\n- `ca_host` that the user will have to trust so that they don't have to verify the fingerprint manually during the first connection\n\nHowever it is also possible to use a single `ca` keypair for both usage.\n\n# Warning\n\nIn this tutorial we will be creating SSH CA to Validate Hosts and Clients.\n\nNormally, the signing keys would not be stored on the ssh server or in a git repo like this. This is for demonstration purposes. \n\nFor a more production ready approach see [this](https://eng.lyft.com/blessing-your-ssh-at-lyft-a1b38f81629d).\n\n\n# What we want...\n\nWe want a simple docker setup, where we create an ssh server from a docker file, provide some keys and certs, and can ssh to it using SSH CA, and not provide a password.\n\n- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-support_for_openssh_certificates\n- https://docs.docker.com/engine/examples/running_ssh_service/#run-a-test_sshd-container\n- https://www.digitalocean.com/community/tutorials/how-to-create-an-ssh-ca-to-validate-hosts-and-clients-with-ubuntu\n- https://jameshfisher.com/2018/03/16/how-to-create-an-ssh-certificate-authority.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2For13%2Fdocker-ssh-ca-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2For13%2Fdocker-ssh-ca-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2For13%2Fdocker-ssh-ca-tutorial/lists"}