Last active
November 20, 2018 08:01
-
-
Save aleozlx/9464d2bd5713115e00302279aed342b8 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
| # yum -y install sudo | |
| ME=ansible | |
| useradd ${ME} | |
| mkdir -p "/home/${ME}" | |
| echo "${ME} All=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/${ME}" | |
| mkdir -pv "/home/${ME}/.ssh" | |
| echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIxMOh1s9+bMx+BrsZ9gnvUeMXfTYP2pYM96weaZ+GUl alex@ansible.3cv-research.com' >> "/home/${ME}/.ssh/authorized_keys" | |
| chown -R ${ME}:${ME} "/home/${ME}" | |
| chmod 700 "/home/${ME}/.ssh" | |
| chmod 600 "/home/${ME}/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment