{"id":27881160,"url":"https://github.com/abbbi/sshcont","last_synced_at":"2025-10-11T07:10:45.238Z","repository":{"id":272736176,"uuid":"917344574","full_name":"abbbi/sshcont","owner":"abbbi","description":"ssh daemon that starts and enters a throwaway docker container for testing","archived":false,"fork":false,"pushed_at":"2025-04-10T09:10:48.000Z","size":46,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T03:55:26.213Z","etag":null,"topics":["ci-cd","continuous-integration","docker","honeypot","ssh-server","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abbbi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"abbbi","buy_me_a_coffee":"abbbi"}},"created_at":"2025-01-15T20:04:31.000Z","updated_at":"2025-04-26T22:12:33.000Z","dependencies_parsed_at":"2025-01-16T10:51:31.769Z","dependency_job_id":"1dd28b65-4e7e-4515-ab9f-0a68e473d728","html_url":"https://github.com/abbbi/sshcont","commit_stats":null,"previous_names":["abbbi/sshcont"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/abbbi/sshcont","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbbi%2Fsshcont","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbbi%2Fsshcont/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbbi%2Fsshcont/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbbi%2Fsshcont/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abbbi","download_url":"https://codeload.github.com/abbbi/sshcont/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbbi%2Fsshcont/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006586,"owners_count":26084129,"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-10-11T02:00:06.511Z","response_time":55,"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":["ci-cd","continuous-integration","docker","honeypot","ssh-server","testing-tools"],"created_at":"2025-05-05T04:59:59.680Z","updated_at":"2025-10-11T07:10:45.223Z","avatar_url":"https://github.com/abbbi.png","language":"Go","funding_links":["https://github.com/sponsors/abbbi","https://buymeacoffee.com/abbbi"],"categories":[],"sub_categories":[],"readme":"# sshcont\n\nspawn throwaway systemd or non-systemd based docker containers using ssh.\n\n# Usage:\n\n```\nsshcont:\n  -bind string\n        bind address, 127.0.0.1:2222, use :2222 for all (default \"127.0.0.1:2222\")\n  -cmd string\n        Execute cmd after login, example: ls\n  -endpoint string\n        Docker endpoint. Default: use environment settings. Example: tcp://192.168.1.100:2375\n  -export string\n        Before removing, export container contents to specified directory, example: /tmp/\n  -image string\n        Force image to be executed\n  -vol string\n        Share volume into container, example: /home/:/home_shared\n```\n\n\nafter starting the service, use the following ssh command to start and enter an\ncontainer:\n\n```\n ssh -l \"jrei/systemd-debian\" -o StrictHostKeychecking=no localhost -p 2222\n root@89fb0de78a12:/\n```\n\nor likewise:\n\n```\nRHEL:\n ssh -l \"registry.access.redhat.com/ubi9/ubi-init:latest\" -o StrictHostKeychecking=no localhost -p 2222\n root@89fb0de78a14:/\nSLES:\n ssh -l \"registry.suse.com/bci/bci-init:15.6\" -o StrictHostKeychecking=no localhost -p 2222\n root@89fb0de78a15:/\n```\n\nregular:\n\n```\nssh -l \"debian:bookworm\" -o StrictHostKeychecking=no localhost -p 2222\n root@89fb0de78a16:/\nssh -l \"alpine:latest\" -o StrictHostKeychecking=no localhost -p 2222\n root@89fb0de78a17:/\n```\n\n# Executing scripts for CI testing\n\nExecute predefined script by using the `cmd` option:\n\n```\n cat /tmp/ci/test.sh\n #!/bin/bash\n exit 1\n\n sshcon -vol /tmp/ci:/ci -cmd /ci/test.sh\n user@host: ~ $ ssh -l \"debian:bookworm\" -o StrictHostKeychecking=no localhost -p 2222\n Connection to localhost closed.\n user@host: ~ $ echo $?\n 1\n```\n\non multiple containers:\n\n```\nfor dist in $(echo \"debian:bookworm\" \"debian:buster\" \"debian:bullseye\"\n\"alpine:latest\" \"registry.suse.com/bci/bci-init:15.6\"); do\n    ssh -l \"$dist\" -o StrictHostKeychecking=no localhost -p 2222;\ndone\n```\n\nor directly execute a command via ssh call:\n\n```\n ssh -l \"debian:bookworm\" -o StrictHostKeychecking=no localhost -p 2222 ls; echo $?\n bin   dev  home  lib64  mnt  proc  run   srv  tmp  var\n boot  etc  lib   media  opt  root  sbin  sys  usr\n 0\n```\n\n# Notes:\n\n* No authentication implemented, you should not run this on a public network\n  interface.\n* Container images not available on the host will be pulled.\n* Container is removed after exiting the session.\n\n# Why?\n\n* I know [containerssh](https://github.com/containerssh) exists, but it brings\n  way too much features i dont need.\n* Sometimes i work on systems where docker is not available but need quick\n  access to an container for testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbbi%2Fsshcont","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbbi%2Fsshcont","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbbi%2Fsshcont/lists"}