{"id":19140163,"url":"https://github.com/kadasz/ssh-aliases","last_synced_at":"2026-04-27T00:31:38.102Z","repository":{"id":195253520,"uuid":"692557421","full_name":"kadasz/ssh-aliases","owner":"kadasz","description":"Fast connection by shell aliases for ssh based on Foreman All Hosts","archived":false,"fork":false,"pushed_at":"2023-09-17T13:02:11.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T10:42:57.874Z","etag":null,"topics":["bash","bash-aliases","foreman","ssh","ssh-aliases"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kadasz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-16T21:09:58.000Z","updated_at":"2023-09-18T10:22:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b3d4c56-97ec-462b-940e-541886ca85bc","html_url":"https://github.com/kadasz/ssh-aliases","commit_stats":null,"previous_names":["kadasz/ssh-aliases"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kadasz/ssh-aliases","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadasz%2Fssh-aliases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadasz%2Fssh-aliases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadasz%2Fssh-aliases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadasz%2Fssh-aliases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadasz","download_url":"https://codeload.github.com/kadasz/ssh-aliases/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadasz%2Fssh-aliases/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bash","bash-aliases","foreman","ssh","ssh-aliases"],"created_at":"2024-11-09T07:16:35.494Z","updated_at":"2026-04-27T00:31:38.085Z","avatar_url":"https://github.com/kadasz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssh-aliases\nThat's a quicky way to prepare bash alliases with ssh connection based on available Hosts in Foreman. \n\n## How's it work?\nJust specify required parameters like Foreman's url, Foreman's admin password and username for ssh connections and optionally name of output file which will store ssh aliases entry as: \n\n```bash\n$ ./autogen_aliases.py --h\nusage: autogen_aliases.py [-h] [-v] [--url URL] [--pwd PWD] [-u USER] [--output OUTPUT]\n\nSimple script to crate bash aliases with ssh connection base on Foreman Hosts\n\noptional arguments:\n  -h, --help       show this help message and exit\n  -v, --version    Print version\n  --url URL        Type domain or IP of Foreman\n  --pwd PWD        Enter passwd of Foreman's admin\n  -u USER          Type your user for ssh session\n  --output OUTPUT  Optionally specify the name of output file\n\n```\n\nThe output is created files named **bash_ssh_aliases_autogen** or which was specify by **--output** parameter like:\n\n```bash\n$ ./autogen_aliases.py --url foreman.domain.com --pwd mypass1qaz -u myuser\n$ cat bash_ssh_aliases_autogen\nssh_myserver1=\"sshpass -p $PASSWD ssh myuser@10.0.0.10\"\nssh_myserver2=\"sshpass -p $PASSWD ssh myuser@10.0.0.11\"\nssh_serverap1=\"sshpass -p $PASSWD ssh myuser@10.0.0.21\"\nssh_serverap2=\"sshpass -p $PASSWD ssh myuser@10.0.0.22\"\nssh_serverdb1=\"sshpass -p $PASSWD ssh myuser@10.0.0.23\"\n```\nAs you see  also need to determine **$PASSWD** env variables for storing password of ssh connection, for that create a file called e.g. pass and put password there:\n\n```bash\n$ cat .pass\nexport PASSWD=\"mysupersecurepassword\"\n```\n\nand at last let's configure bash aliases by adding to bashrc entries something like that:\n\n```\nif [ -f  ~/.bash_ssh_aliases_autogen ]; then\n  . ~/.pass\n  . ~/.bash_ssh_aliases_autogen\nfi\n```\n\nThat's all, help yourself! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadasz%2Fssh-aliases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadasz%2Fssh-aliases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadasz%2Fssh-aliases/lists"}