{"id":32332603,"url":"https://github.com/folbricht/sshtest","last_synced_at":"2026-07-17T14:38:01.474Z","repository":{"id":57504090,"uuid":"177339221","full_name":"folbricht/sshtest","owner":"folbricht","description":"Utilities for testing SSH clients in Go","archived":false,"fork":false,"pushed_at":"2019-03-23T22:03:13.000Z","size":7,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-07-17T14:37:27.540Z","etag":null,"topics":["go","golang","server","ssh","testing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folbricht.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}},"created_at":"2019-03-23T20:55:54.000Z","updated_at":"2025-07-03T00:29:09.000Z","dependencies_parsed_at":"2022-08-28T02:01:39.756Z","dependency_job_id":null,"html_url":"https://github.com/folbricht/sshtest","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/folbricht/sshtest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folbricht%2Fsshtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folbricht%2Fsshtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folbricht%2Fsshtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folbricht%2Fsshtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folbricht","download_url":"https://codeload.github.com/folbricht/sshtest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folbricht%2Fsshtest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35585713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-17T02:00:06.162Z","response_time":116,"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":["go","golang","server","ssh","testing"],"created_at":"2025-10-23T20:12:42.851Z","updated_at":"2026-07-17T14:38:01.469Z","avatar_url":"https://github.com/folbricht.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sshtest\n\nsshtest is a set of utilities for testing SSH features in Go. It currently supports quick setup and start of SSH servers to test a client against. To minimize the need for error handling in tests, most functions panic on error.\n\n## Examples\n\n### Start a simple SSH server with host key\n\n```go\nhostKey := sshtest.KeyFromFile(\"ssh-host-key\", \"\")\nserver := sshtest.NewServer(hostKey)\ndefer server.Close()\n```\n\n### Start an SSH server with host key and certificate\n\n```go\nhostKey := sshtest.KeyFromFile(\"ssh-host-key\", \"ssh-host-key-cert.pub\")\nserver := sshtest.NewServer(hostKey)\ndefer server.Close()\n```\n\n### SSH server with custom server config and handler\n\n```go\nhostKey := sshtest.KeyFromFile(\"ssh-host-key\", \"\")\n\nserver := sshtest.NewUnstartedServer()\nserver.Config = \u0026ssh.ServerConfig{NoClientAuth: true}\nserver.Config.AddHostKey(hostKey)\nserver.Handler = func(ch ssh.Channel, in \u003c-chan *ssh.Request) {\n  defer ch.Close()\n\n  // Read a request from the client\n  req, ok := \u003c-in\n  if !ok {\n    return\n  }\n  fmt.Printf(\"Received '%s' request from client\", req.Type)\n\n  // Reply with a string\n  req.Reply(true, []byte(\"Hello client\"))\n\n  // Let the client know the command completed successfuly (status=0)\n  sshtest.SendStatus(ch, 0)\n}\n\nserver.Start()\ndefer server.Close()\n```\n\n## Links\n\n- Go SSH library - [https://godoc.org/golang.org/x/crypto/ssh](https://godoc.org/golang.org/x/crypto/ssh)\n- GoDoc for sshtest - [https://godoc.org/github.com/folbricht/sshtest](https://godoc.org/github.com/folbricht/sshtest)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolbricht%2Fsshtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolbricht%2Fsshtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolbricht%2Fsshtest/lists"}