{"id":16649775,"url":"https://github.com/william-stearns/sshprep","last_synced_at":"2025-09-02T14:30:39.440Z","repository":{"id":43025550,"uuid":"464346383","full_name":"william-stearns/sshprep","owner":"william-stearns","description":"Sets up all the layers needed to log in over ssh with ssh keys","archived":false,"fork":false,"pushed_at":"2025-07-29T16:51:06.000Z","size":51,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-28T15:04:35.387Z","etag":null,"topics":["bash-script","mit-license","ssh","ssh-agent","ssh-key","ssh-keys"],"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/william-stearns.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":"2022-02-28T05:10:36.000Z","updated_at":"2025-07-29T16:51:10.000Z","dependencies_parsed_at":"2024-10-28T11:26:36.661Z","dependency_job_id":"6a0ce024-4305-448f-a43d-f66c12748570","html_url":"https://github.com/william-stearns/sshprep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/william-stearns/sshprep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-stearns%2Fsshprep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-stearns%2Fsshprep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-stearns%2Fsshprep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-stearns%2Fsshprep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/william-stearns","download_url":"https://codeload.github.com/william-stearns/sshprep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-stearns%2Fsshprep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273297471,"owners_count":25080405,"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-09-02T02:00:09.530Z","response_time":77,"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":["bash-script","mit-license","ssh","ssh-agent","ssh-key","ssh-keys"],"created_at":"2024-10-12T09:12:21.773Z","updated_at":"2025-09-02T14:30:39.144Z","avatar_url":"https://github.com/william-stearns.png","language":"Shell","readme":"# sshprep\n\nFor an introduction to using ssh keys and sshprep, please see https://www.youtube.com/watch?v=62hps0XZkN8\n\n# Sets up all the layers needed to log in over ssh with ssh keys\n- Uses existing ssh-agent or agent forwarding, or suggests how to enable it in .bashrc\n- Uses keys already loaded into the agent\n- Creates and loads the keypair if no keys in the agent\n- Command line can have a list of potential target hosts, which can be \"host\" or \"user@host\"\n- For each target, creates a new stanza in ~/.ssh/config\n- Sets up ipv4 and/or ipv6 connections if host resolves to both.\n- Uses entry in /etc/hosts if available.\n- Asks the user for a hostname or IP if no resolvable hostname\n- Confirms that passwordless login works at the end.\n- -v for verbose mode\n- -s for single-step mode; user is asked before each potential system change.\n- -h for command line help\n- --authpath allows you to specify the directory holding authorized_keys (useful for VMWare ESXi)\n- Will operate on an intermediate host with no local keys if one ssh's there with -A (forward agent) mode\n\n# Additional notes\n- Only standard Linux/posix utilities needed\n- No sudo or root requirements\n- Tested on: \n1. openssh on Linux under bash\n2. openssh on Windows 10 with Cygwin under cygwin shell\n3. openssh on MacOS under bash\n4. should work with openssh on any OS with bash\n\n\n#Quickstart:\n```\ncurl -fsSL https://raw.githubusercontent.com/william-stearns/sshprep/main/sshprep -O\nchmod 755 sshprep\nmv sshprep *some_directory_in_path*\nsshprep *ssh_hostname*\n```\n- You should now be able to `ssh ssh_hostname` without needing a password.\n- You can customise the stanza for ssh_hostname in ~/.ssh/config\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-stearns%2Fsshprep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliam-stearns%2Fsshprep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-stearns%2Fsshprep/lists"}