Inital commit.

This commit is contained in:
Kai Kewley 2014-04-09 11:14:07 +01:00
parent b51591cc6f
commit f42a788377
3 changed files with 27 additions and 1 deletions

View File

@ -1,4 +1,15 @@
ssl-access
SSL Access
==========
To give me root access to a Ubuntu server.
Run:
```sh
sudo ./create_kaik_user_with_sudo_access.sh
```
One liner:
```sh
cd /tmp && git clone https://github.com/kaicode/ssl_access.git && cd ssh_access && ./create_kaik_user_with_sudo_access.sh && echo 'Kai has access' && cd .. && rm -r ssh_access
```

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
MY_SHELL=$( which bash )
/usr/sbin/useradd -c 'Kai Kewley <kaikewley at gmail.com>' -s ${MY_SHELL} -m kaik
cat >/etc/sudoers.d/kaik-ALL <<EOF
kaik ALL=(ALL:ALL) NOPASSWD: ALL
EOF
chmod 0440 /etc/sudoers.d/kaik-ALL
mkdir ~kaik/.ssh
chmod 700 ~kaik/.ssh
curl https://raw.githubusercontent.com/kaicode/ssh_access/master/kaikewley_rsa.pub >~kaik/.ssh/authorized_keys
chmod 400 ~kaik/.ssh/authorized_keys
chown -R kaik ~kaik/.ssh

1
kaikewley_rsa.pub Normal file
View File

@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTaImIf071KBu+O5lhYqJ1Agafhx7bJYVIKiarALNJQo+EZcPtIckFgm84Hu3M0ajTF2NmVtL336LVt6ohXCd8tJ40LqciqsE1jX493fDSIVTSfLOI7CM4V/p1thd6Ism2gb6jxIJ4xDGA0M8jqLgBml0HCzZxevmekIdB5qyhlNInyHsebpB2hGlyWPdF6R5c55fL70mFHfWWfWbkuVIqhJ792IslLYpapV5Xat/or7z5BfovbrfgGIAGNCcpes5ylnf28mIo66JMrJhbvkPq6L4mxxOujqtaaUjCpx+a2IVDIM3VVstTTv2x8e77or9thSPq8MrMOUChfcJ+gvyD kaikewley@gmail.com