Skip to content

Ansible playbook that replaces ssh keys in the authorized_keys file of all non-system users and the root user.

License

Notifications You must be signed in to change notification settings

fnkr/ansible-update-authorized-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible playbook that replaces ssh keys in the authorized_keys file of all non-system users and the root user.

Usage

1) Define which keys to replace (see keys_to_replace.yaml for example)

keys_to_replace:
  # '<old key>': '<new key>'
  'ssh-rsa AAAAB3NzaC1yc2E... [email protected]': 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5... [email protected]'

2) Run playbook

ansible-playbook replace_keys.yaml -e @keys_to_replace.yaml -i ~/my-inventory.ini

About

Ansible playbook that replaces ssh keys in the authorized_keys file of all non-system users and the root user.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published