Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryankwilliams/ansible-ssh-copy-id
Ansible role to inject SSH public keys into remote systems for pass wordless entry
https://github.com/ryankwilliams/ansible-ssh-copy-id
Last synced: 10 days ago
JSON representation
Ansible role to inject SSH public keys into remote systems for pass wordless entry
- Host: GitHub
- URL: https://github.com/ryankwilliams/ansible-ssh-copy-id
- Owner: ryankwilliams
- License: gpl-3.0
- Created: 2017-11-03T15:50:56.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-04-01T11:04:48.000Z (over 1 year ago)
- Last Synced: 2023-04-01T11:17:04.245Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 50
- Watchers: 4
- Forks: 27
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ssh-copy-id
This role provides the ability to authorize remote systems for passwordless
SSH authentication.This role is helpful when you have a remote machine you want to use by
ansible and wish to use SSH key based authentication. It will handle setting
the SSH keys on the remote machine allowing you to create an ansible inventory
file with the remote machine. Then you can easily call any ansible playbook
against the remote machine.## Role Variables
Below are the available varaibles you will need to supply to the role.
| Variable | Description |
| --- | --- |
| hostname | remote system to connect to (FQDN or IP) |
| username | username to connect to remote system |
| password | password to connect to remote system |
| ssh_public_key | public key file (absolute path) to set into remote system |
| port | SSH port to connect to |## Example Playbook
This example play below demonstrates ansible setting up passwordless SSH
authentication on a user supplied remote machine that currently does not have
SSH key based authentication configured.```yaml
---
- name: configure passwordless ssh authentication on a remote machine
hosts: localhostroles:
- role: ryankwilliams.ssh_copy_id
vars:
hostname: 127.0.0.1
username: username
password: password
ssh_public_key: /home/username/.ssh/id_rsa.pub
hetzner_storagebox: true
ssh_port: 22
```## License
GPLv3
## Author Information
Ryan Williams