{"id":19150929,"url":"https://github.com/hequan2017/go-webssh","last_synced_at":"2025-08-25T16:01:53.940Z","repository":{"id":41045126,"uuid":"199861570","full_name":"hequan2017/go-webssh","owner":"hequan2017","description":"go版本 webssh ","archived":false,"fork":false,"pushed_at":"2021-08-31T09:30:01.000Z","size":131,"stargazers_count":75,"open_issues_count":1,"forks_count":31,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T19:04:51.032Z","etag":null,"topics":["go","gossh","gowebssh","ssh","webssh"],"latest_commit_sha":null,"homepage":null,"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/hequan2017.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-07-31T13:27:43.000Z","updated_at":"2025-01-16T07:19:14.000Z","dependencies_parsed_at":"2022-09-20T20:52:03.685Z","dependency_job_id":null,"html_url":"https://github.com/hequan2017/go-webssh","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hequan2017%2Fgo-webssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hequan2017%2Fgo-webssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hequan2017%2Fgo-webssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hequan2017%2Fgo-webssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hequan2017","download_url":"https://codeload.github.com/hequan2017/go-webssh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819485,"owners_count":21809031,"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":["go","gossh","gowebssh","ssh","webssh"],"created_at":"2024-11-09T08:13:23.016Z","updated_at":"2025-05-07T05:24:13.677Z","avatar_url":"https://github.com/hequan2017.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-webssh\ngo版本 webssh \n\n## 核心\n\u003e 本项目代码来自 https://github.com/dejavuzhou/felix ，只是把里面的webssh拿出来，修改了一下，做成webssh，特此说明.有需要可以查看此项目。\n\n\n## 安装\n\u003e  修改 core/ssh.go 里面的账号密码地址等信息。 也可以自己修改成用密钥登录。\n```go\nfunc NewSshClient() (*ssh.Client, error) {\n\tconfig := \u0026ssh.ClientConfig{\n\t\tTimeout:         time.Second * 5,\n\t\tUser:            \"root\",\n\t\tHostKeyCallback: ssh.InsecureIgnoreHostKey(), //这个可以， 但是不够安全\n\t\t//HostKeyCallback: hostKeyCallBackFunc(h.Host),\n\t}\n\t//if h.Type == \"password\" {\n\tconfig.Auth = []ssh.AuthMethod{ssh.Password(\"123456\")}\n\t//} else {\n\t//\tconfig.Auth = []ssh.AuthMethod{publicKeyAuthFunc(h.Key)}\n\t//}\n\taddr := fmt.Sprintf(\"%s:%d\", \"192.168.100.200\", 22)\n\tc, err := ssh.Dial(\"tcp\", addr, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn c, nil\n}\n\n```\n\n```shell script\n\ngo build main.go\ngo run  main.go \n\n```\n\n## 前端\n\u003e 我测试的时候用得是 vue，你可以放进你们项目里面。在web/vue/index.vue里面，记得修改32行的 后端地址 xterm是3版本\n\n\u003e xterm 4 版本 可以参考我这个 博客 https://blog.51cto.com/hequan/3712190\n\n\u003e 也可以自己弄个普通 index.html ，放一个websocket连接即可。\n\n\u003e  web/html  是普通版本index.html，未测试，仅供参考！  \n\n\n## demo\n\n![SQL](static/demo/demo1.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhequan2017%2Fgo-webssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhequan2017%2Fgo-webssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhequan2017%2Fgo-webssh/lists"}