Last active
April 8, 2020 18:52
-
-
Save duffney/f517e0638dad804d2660d3c8d64316fb to your computer and use it in GitHub Desktop.
This file contains 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 | |
sudo apt-get install python -y | |
useradd -m -d /home/ansible -s /bin/bash ansible | |
echo 'ansible:P@ssw0rd'|chpasswd | |
echo 'ansible ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | |
sudo sed -n 'H;${x;s/\PasswordAuthentication no/PasswordAuthentication yes/;p;}' /etc/ssh/sshd_config > tmp_sshd_config | |
sudo cat tmp_sshd_config > /etc/ssh/sshd_config | |
rm -f tmp_sshd_config | |
sudo service sshd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment