This repository contains a Bash script and an Ansible playbook to streamline the process of changing SSH passwords on multiple servers.
- Ansible
- Bash (should be available by default on most Unix-like systems)
-
Clone the repository:
git clone https://github.com/arynishere/ChangePassword.git cd ChangePassword -
Run the Bash script:
./chpass.sh
The script will prompt you for a username, a filename, and a hostname. The filename should contain necessary variables (e.g.,
new_ssh_password,mysecretsalt,) in YAML format andhostnamein txt format.now just wait for the script to finish, you can check the script to see how the playbook is deployed.
# vault.yml
new_ssh_password: 'your_plain_password'
mysecretsalt: 'your_secret_salt'