Commit b2b997c
Changed files (1)
README.md
@@ -8,6 +8,7 @@
### Pre-ansible changes
+`ssh
`ssh root@tmc -A`
* Disable root ssh access
@@ -17,13 +18,18 @@
* Create ubuntu user with passwordless sudoer, ssh access, sudo group
- `# adduser ubuntu` *hit enter about 15 times (creates user without a password)*
+ `# adduser ubuntu` *hit enter exactly 13 times (creates user without a password)*
`# usermod -aG sudo ubuntu`
`# EDITOR=vi visudo`
+ `# su ubuntu`
+ `$ mkdir ~/.ssh`
`$ sudo cat /root/.ssh/authorized_keys > ~/.ssh/authorized_keys`
-* Restart ssh, verify
+* Reconnect ssh as ubuntu, Restart ssh, Verify root can't login via ssh
+ `$ exit`
+ `$ ssh root@tmc` # expect failure
+ `$ ssh ubuntu@tmc` # expect success
`$ sudo systemctl restart ssh`
`ssh ubuntu@tmc -A`
@@ -49,4 +55,4 @@
* Run ansible playbook
- `$ ansible-playbook main`
+ `$ ansible-playbook main.yml`