Created
April 21, 2020 16:20
-
-
Save mbround18/04ec8ae826beed4a204857b39ce6fe13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
useradd -rm -s /bin/bash ansible | |
mkdir --parent /home/ansible/.ssh | |
touch /home/ansible/.ssh/authorized_keys | |
echo "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIqedbDxKmTJL0D2f7r6U82ouzwyZEsrYxlETlqjRHhg8zUXRTqTns769og99xk5oNgi/heOGCHiLX2BQ5GVF9M= ansible@salt-master-01" > /home/ansible/.ssh/authorized_keys | |
chown ansible -R /home/ansible/.ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment