{"id":19107242,"url":"https://github.com/govtechsg/slist","last_synced_at":"2025-04-30T18:42:52.073Z","repository":{"id":52259824,"uuid":"168272763","full_name":"GovTechSG/slist","owner":"GovTechSG","description":"slist is a tool to list your servers in ssh config and ssh into it","archived":false,"fork":false,"pushed_at":"2022-08-29T07:07:15.000Z","size":430,"stargazers_count":25,"open_issues_count":1,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-19T08:10:27.337Z","etag":null,"topics":["bash","bash-script","slist","ssh","ssh-client","ssh-config","ssh-connection","tool","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/GovTechSG.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-01-30T03:27:36.000Z","updated_at":"2025-01-03T21:52:40.000Z","dependencies_parsed_at":"2022-09-24T22:40:21.396Z","dependency_job_id":null,"html_url":"https://github.com/GovTechSG/slist","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fslist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fslist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fslist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovTechSG%2Fslist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GovTechSG","download_url":"https://codeload.github.com/GovTechSG/slist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251764551,"owners_count":21640085,"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":["bash","bash-script","slist","ssh","ssh-client","ssh-config","ssh-connection","tool","zsh"],"created_at":"2024-11-09T04:11:44.161Z","updated_at":"2025-04-30T18:42:51.997Z","avatar_url":"https://github.com/GovTechSG.png","language":"Shell","readme":"# slist\n\n![alt text](https://github.com/GovTechSG/slist/blob/master/slist.png?raw=true)\n\n![version](https://img.shields.io/github/release/GovTechSG/slist.svg?style=flat) [![CI](https://github.com/GovTechSG/slist/actions/workflows/actions.yml/badge.svg)](https://github.com/GovTechSG/slist/actions/workflows/actions.yml)\n\nslist is a tool to list your servers in ssh config and ssh into it.\\\nThis only works on Unix machines.\\\nslist aims to solve the problem of users having to remember aliases or IP addresses of all their servers.\\\nslist reads the aliases in the ~/.ssh/config file and list them in the terminal.\n\n## Setting it up\n\n```bash\n$ cd \u003cpath_of_choice\u003e\n$ git clone https://github.com/GovTechSG/slist.git\n$ chmod +x slist.sh\n\n# Use full path of slist.sh for symlink to work\n$ ln -s \u003cpath_of_choice\u003e/slist.sh /usr/local/bin/slist\n$ slist\n```\n\n## SSH Config File Format\n\n```bash\n# If you have a jump host\nHost jumpHost\n  User \u003cyour_user\u003e\n  HostName \u003cip_address\u003e\n  Port 22\n  IdentityFile \u003cpath_to_private_key\u003e\n\nHost \u003cyour_host\u003e\n  User \u003cyour_user\u003e\n  HostName \u003cip_address\u003e\n  ProxyCommand ssh -A jumpHost nc %h %p   # If you want to use the jumpHost to connect to the host\n  Port 22\n  IdentityFile \u003cpath_to_private_key\u003e\n\nHost \u003cyour_host2\u003e\n  User \u003cyour_user2\u003e\n  HostName \u003cip_address2\u003e\n  Port 22\n  IdentityFile \u003cpath_to_private_key\u003e\n```\n\n## Usage\n\nUsage: slist [-fhl]\n             [--add-host host_name --ip-adr ip_address [--ssh-user user --port port_number --keypath keyname_with_path]]\n             [--del-host host_name]\n\n```bash\n-f \u003ckeyword\u003e                    Keyword to filter\n-h                              Display help\n-l                              List servers with ip addresses\n-l -f \u003ckeyword\u003e                 Filter list work \u003ckeyword\u003e\n-e                              Open and edit ~/.ssh/config\n--add-host \u003chost_name\u003e          Add a new host to the SSH config file. Must be used together with --ip-adr option\n--ip-adr \u003cip_address\u003e           Add a new IP address to the SSH config file. Must be used together with --add-host option\n--ssh-user \u003cuser\u003e               Add a new SSH user to SSH config file. Must be used together with --add-host and --ip-adr options\n--port \u003cport_number\u003e            Add a new port number to SSH config file. Must be used together with --add-host and --ip-adr options\n--keypath \u003ckeyname_with_path\u003e   Add a new key file to SSH config file. Must be used together with --add-host and --ip-adr options\n--del-host \u003chost_name\u003e          Delete a host from the SSH config file\n--file                   To use other config file\n--init \u003cfile_path\u003e              To initialize a template SSH config file\n```\n\n## Changing colours theme for slist\n\nTo make persistent color change to slist theme.\\\nIf you are using bash shell, add below 2 lines to .bashrc or .profile or .bash_profile.\\\nIf you are using zsh shell, add below 2 lines to .zshrc.\\\n\nexport color_theme1=cyan\\\nexport color_theme2=yellow\n\nSupported colors:\nblack red green yellow blue pink cyan white\n\n## Screenshots\n\n![Optional Text](../master/screenshots/slist.png)\n![Optional Text](../master/screenshots/filter.png)\n\n## Developer Guide\n\n### Running Tests\n\nTo run tests in tests/slist_test.sh you will need to install [shunit2](https://github.com/kward/shunit2)\n\n```bash\n# To install shunit2 on MacOS\n$ brew install shunit2\n\n# To install shunit2 on Fedora/RHEL/CentOS/EPEL\n$ yum install shunit2\n\n# To install shunit2 on Ubuntu\n$ apt-get install shunit2\n\n# To run tests\n$ ./tests/slist_test.sh\n```\n\n### Contributing Your Code\n\nIf you would like to contribute to this repo, please open an issue, fork the repo, implement your code and tests and create a PR\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovtechsg%2Fslist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovtechsg%2Fslist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovtechsg%2Fslist/lists"}