{"id":28360269,"url":"https://github.com/godu92/textual-ssh","last_synced_at":"2026-05-10T06:33:36.842Z","repository":{"id":294718395,"uuid":"987851600","full_name":"Godu92/textual-ssh","owner":"Godu92","description":"This project is an attempt at trying to get a python textual front end connecting to a backend bash script as a way of connecting to various servers using ssh","archived":false,"fork":false,"pushed_at":"2025-05-21T17:47:52.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T18:54:55.317Z","etag":null,"topics":["bash","python","ssh","sshpass","textual"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Godu92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-05-21T17:21:45.000Z","updated_at":"2025-05-21T17:48:44.000Z","dependencies_parsed_at":"2025-05-21T18:54:59.733Z","dependency_job_id":"19115052-8da6-484b-8b31-b13083ef576b","html_url":"https://github.com/Godu92/textual-ssh","commit_stats":null,"previous_names":["godu92/textual-ssh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Godu92/textual-ssh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godu92%2Ftextual-ssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godu92%2Ftextual-ssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godu92%2Ftextual-ssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godu92%2Ftextual-ssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Godu92","download_url":"https://codeload.github.com/Godu92/textual-ssh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godu92%2Ftextual-ssh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261371715,"owners_count":23148669,"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","python","ssh","sshpass","textual"],"created_at":"2025-05-28T11:06:05.458Z","updated_at":"2026-05-10T06:33:36.836Z","avatar_url":"https://github.com/Godu92.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Textual SSH\n\n- [Textual SSH](#con-textual-connection-textual-servers)\n  - [TODO](#todo)\n  - [About](#about)\n    - [Bash](#bash)\n      - [Bash - Setup](#bash---setup)\n      - [Bash - Usage](#bash---usage)\n    - [Python](#python)\n      - [Python - Setup](#python---setup)\n    - [Alias](#alias)\n      - [Alias - Bash - Setup](#alias---bash---setup)\n      - [Alias - Python - Setup](#alias---python---setup)\n\n## TODO\n\n- setup the python portion\n- maybe also get it setup to use specific password files\n  - Consider using environment variables or a secure keyring service like `pass` or `gopass`\n\n## About\n\nThis project is an attempt at trying to get a python textual front end connecting to a backend bash script as a way of connecting to various servers using ssh.\n\n### Bash\n\nThe bash portion is to do the following:\n\n- The script dynamically constructs the ssh command based on the input parameters and the JSON configuration.\n- It retrieves the user, domain, and machine_name from the JSON file.\n- The display_help function shows a list of valid machine types and domains in a tabular format using column -t. This makes it easy to understand the available options.\n- The `base` script checks if the provided `machine_type` and `domain` exist in the JSON configuration. If not, it displays an error message and the help text.\n\n#### Bash - Setup\n\n- Create a `.json` file to match what your case is (also visible in `example.json`)\n  - Example:\n\n    ```json\n    {\n        \"user\": \"user\",\n        \"domains\": {\n            \"east\": \"us-east.com\",\n            \"west\": \"us-west.com\"\n        },\n        \"machines\": {\n            \"db1\": \"test-db1\",\n            \"db2\": \"test-db2\",\n            \"ui\": \"test-ui\",\n            \"server\": \"test-server\"\n        }\n    }\n    ```\n\n- Also create a `.env` file that will store your password (if needed)\n\n    ```sh\n    PASSWORD=mypassword\n    ```\n\n- Adding New Machines/domains:\n  - To add new machine types or domains, simply update the machines.json file.\n- Support for Different Users:\n  - You can extend create new `json` files with different users as needed.\n\n#### Bash - Usage\n\n- Make sure the scripts are executable:\n\n    ```sh\n    chmod +x connect_base.sh\n    chmod +x connect_plain.sh\n    chmod +x connect_pass.sh\n    ```\n\n- Run the script with parameters:\n\n    ```sh\n    ./connect db east\n    ./connect_pass db east\n    ```\n\n    This will connect to `ssh user@test-db1.us-east.com` and print the password for manual entry.\n\n- Run the script without parameters to see the help text:\n\n    ```sh\n    ./connect\n    ./connect_pass\n    ```\n\n    This will display a list of available machine types and domains.\n\n### Python\n\nThe python portion is a script making use of the `textual` library to make a clickable user interface in the terminal that can be used to select the machine and domain rather than typing.\n\n- would be really neat if it even came with the option to add to the file from the interface\n- also would be nice for \"one off connections\" that allow user input\n  - even cooler if it kept a history of these \"one offs\" in a separate db-esq file\n\n#### Python - Setup\n\n### Alias\n\nOnce all of this is setup, it would be good to make aliases that could be used to call these from anywhere\n\n#### Alias - Bash - Setup\n\nAdd the following lines into your `.bashrc` (or where ever you prefer to stick your aliases)\n\n```sh\nconnect=~/git/textual-servers/bash/connect_plain.sh\nconnect-pass=~/git/textual-servers/bash/connect_pass.sh\n```\n\n#### Alias - Python - Setup\n\nAdd the following lines into your `.bashrc` (or where ever you prefer to stick your aliases)\n\n```sh\nconnect=~/git/textual-servers/bash/connect.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodu92%2Ftextual-ssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodu92%2Ftextual-ssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodu92%2Ftextual-ssh/lists"}