Last active
December 13, 2018 00:36
-
-
Save aleozlx/fc468bec8a31ef7c4f9bf0605e52f74c to your computer and use it in GitHub Desktop.
Authorize myself into machines
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
| ME=aleozlx | |
| useradd ${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" | |
| echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH28Ycjjv1L+BVsycPK/gTittc3Xv9ENpAOPfkfM20dy alex@latitude-5289' >> "/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