{"id":13582519,"url":"https://github.com/xwjdsh/manssh","last_synced_at":"2025-08-28T06:21:15.195Z","repository":{"id":25725275,"uuid":"106156221","full_name":"xwjdsh/manssh","owner":"xwjdsh","description":"Manage your ssh alias configs easily.","archived":false,"fork":false,"pushed_at":"2022-02-11T06:40:44.000Z","size":7640,"stargazers_count":303,"open_issues_count":2,"forks_count":25,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-25T05:04:55.758Z","etag":null,"topics":["command-line","golang","ssh","sshconfig"],"latest_commit_sha":null,"homepage":"","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/xwjdsh.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":"2017-10-08T06:52:42.000Z","updated_at":"2025-08-18T08:34:41.000Z","dependencies_parsed_at":"2022-07-27T05:16:36.638Z","dependency_job_id":null,"html_url":"https://github.com/xwjdsh/manssh","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/xwjdsh/manssh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwjdsh%2Fmanssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwjdsh%2Fmanssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwjdsh%2Fmanssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwjdsh%2Fmanssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwjdsh","download_url":"https://codeload.github.com/xwjdsh/manssh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwjdsh%2Fmanssh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272453018,"owners_count":24937467,"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-28T02:00:10.768Z","response_time":74,"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":["command-line","golang","ssh","sshconfig"],"created_at":"2024-08-01T15:02:47.604Z","updated_at":"2025-08-28T06:21:15.176Z","avatar_url":"https://github.com/xwjdsh.png","language":"Go","funding_links":[],"categories":["软件包","Go","Software Packages","Uncategorized","Go 工具","Go Tools","DevOps Tools"],"sub_categories":["DevOps 工具","DevOps Tools","Uncategorized","devops 工具","代码分析","DevOps工具"],"readme":"# manssh\n\n[![Release](https://img.shields.io/github/release/xwjdsh/manssh.svg?style=flat-square)](https://github.com/xwjdsh/manssh/releases/latest)\n[![Build Status](https://travis-ci.org/xwjdsh/manssh.svg?branch=master)](https://travis-ci.org/xwjdsh/manssh)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xwjdsh/manssh)](https://goreportcard.com/report/github.com/xwjdsh/manssh)\n[![GoCover.io](https://img.shields.io/badge/gocover.io-89.0%25-green.svg)](https://gocover.io/github.com/xwjdsh/manssh)\n[![GoDoc](https://godoc.org/github.com/xwjdsh/manssh?status.svg)](https://godoc.org/github.com/xwjdsh/manssh)\n[![DUB](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/xwjdsh/manssh/blob/master/LICENSE)\n\nmanssh is a command line tool for managing your ssh alias config easily, inspired by [storm](https://github.com/emre/storm) project, powered by Go.\n\nNote:\u003cbr/\u003e\nThis project is actually a simple glue project, the most complex and core parsing ssh config file logic implements by [ssh_config](https://github.com/kevinburke/ssh_config), I didn't do much.\u003cbr/\u003e\nAt first it was just a imitation of [storm](https://github.com/emre/storm), now it has become a little different.\n\n![](https://raw.githubusercontent.com/xwjdsh/manssh/master/screenshot/manssh.gif)\n\n## Feature\n\n* No dependence.\n* Add, list, query, delete ssh alias record.\n* Backup ssh config.\n* [Support Include directive.](#for-include-directive)\n\n## Install\n\n#### Go\nBefore 1.17\n```shell\ngo get -u github.com/xwjdsh/manssh/cmd/manssh\n```\n1.17 or higher\n```\ngo install github.com/xwjdsh/manssh/cmd/manssh\n```\n\n#### Homebrew\n```shell\nbrew tap xwjdsh/tap\nbrew install xwjdsh/tap/manssh\n```\n\n#### Docker\n```shell\nalias manssh='docker run -t --rm -v ~/.ssh/config:/root/.ssh/config wendellsun/manssh'\n```\n\n#### Manual\nDownload it from [releases](https://github.com/xwjdsh/manssh/releases), and extract it to your `PATH` directory.\n\n## Usage\n```text\n% manssh\nNAME:\n   manssh - Manage your ssh alias configs easily\n\nUSAGE:\n   manssh [global options] command [command options] [arguments...]\n\nVERSION:\n   master\n\nCOMMANDS:\n     add, a     Add a new SSH alias record\n     list, l    List or query SSH alias records\n     update, u  Update SSH record by specifying alias name\n     delete, d  Delete SSH records by specifying alias names\n     backup, b  Backup SSH config files\n     help, h    Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --file value, -f value  (default: \"/Users/wendell/.ssh/config\")\n   --help, -h              show help\n   --version, -v           print the version\n```\n\n### Add a new alias\n```shell\n# manssh add test2 2.2.2.2\n# manssh add test1 root@1.1.1.1:77 -c IdentityFile=~/.ssh/wendell\n% manssh add test1 root@1.1.1.1:77 -i ~/.ssh/wendell\n✔ alias[test1] added successfully.\n\n        test1 -\u003e root@1.1.1.1:77\n                identityfile = /Users/wendell/.ssh/wendell\n```\nUsername and port config is optional, the username is current login username and port is `22` by default.\u003cbr/\u003e\nUsing `-c` to set more config options. For convenience, `-i xxx` can instead of `-c identityfile=xxx`.\n\n### List or query alias\n```shell\n# manssh list\n# manssh list \"*\"\n# manssh list Test -ic\n% manssh list test1 77\n✔ Listing 1 records.\n\n        test1 -\u003e root@1.1.1.1:77\n                identityfile = /Users/wendell/.ssh/wendell\n```\nIt will display all alias records If no params offered, or it will using params as keywords query alias records.\u003cbr/\u003e\nIf there is a `-it` option, it will ignore case when searching.\n\n### Update an alias\n```shell\n# manssh update test1 -r test2\n# manssh update test1 root@1.1.1.1:22022\n% manssh update test1 -i \"\" -r test3 -c hostname=3.3.3.3 -c port=22022\n✔ alias[test3] updated successfully.\n\n        test3 -\u003e root@3.3.3.3:22022\n```\nUpdate an existing alias record, it will replace origin user, hostname, port config's if connected string param offered.\u003cbr/\u003e\nYou can use `-c` to update single and extra config option, `-c identityfile= -c proxycommand=` will remove `identityfile` and `proxycommand` options. \u003cbr/\u003e\nFor convenience, `-i xxx` can instead of `-c identityfile=xxx`\u003cbr/\u003e\nRename the alias specified by `-r` flag.\n\n### Delete one or more alias\n```shell\n# manssh delete test1\n% manssh delete test1 test2\n✔ alias[test1,test2] deleted successfully.\n```\n\n### Backup ssh config\n```\n% manssh backup ./config_backup\n✔ backup ssh config to [./config_backup] successfully.\n```\n\n## For Include directive\nIf you use the `Include` directive, there are some extra notes.\n\nAdd `-p`(--path) flag for `list`,`add`,`update`,`delete` command to show the file path where the alias is located, it can also be set by the **MANSSH_SHOW_PATH** environment variable.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eMANSSH_SHOW_PATH\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nSet to `true` to show the file path where the alias is located. Default is `false`.\n\u003c/details\u003e\n\u003cbr/\u003e\n\nAdd `-ap`(--addpath) flag for `add` command to specify the file path to which the alias is added, it can also be set by the **MANSSH_ADD_PATH** environment variable.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eMANSSH_ADD_PATH\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nThis file path indicates to which file to add the alias. Default is the entry config file.\n\u003c/details\u003e\n\u003cbr/\u003e\n\nFor convenience, you can export these environments in your `.zshrc` or `.bashrc`,\nexample:\n\n```bash\nexport MANSSH_SHOW_PATH=true\nexport MANSSH_ADD_PATH=~/.ssh/config.d/temp\n```\n\n## Thanks\n* [kevinburke/ssh_config](https://github.com/kevinburke/ssh_config)\n* [urfave/cli](https://github.com/urfave/cli)\n* [emre/storm](https://github.com/emre/storm)\n\n## Licence\n[MIT License](https://github.com/xwjdsh/manssh/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwjdsh%2Fmanssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwjdsh%2Fmanssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwjdsh%2Fmanssh/lists"}