From f42a788377211a526e39192e39157a558aed2d1d Mon Sep 17 00:00:00 2001 From: Kai Kewley Date: Wed, 9 Apr 2014 11:14:07 +0100 Subject: [PATCH] Inital commit. --- README.md | 13 ++++++++++++- create_kaik_user_with_sudo_access.sh | 14 ++++++++++++++ kaikewley_rsa.pub | 1 + 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 create_kaik_user_with_sudo_access.sh create mode 100644 kaikewley_rsa.pub diff --git a/README.md b/README.md index 074f39d..28672bb 100644 --- a/README.md +++ b/README.md @@ -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 +``` diff --git a/create_kaik_user_with_sudo_access.sh b/create_kaik_user_with_sudo_access.sh new file mode 100755 index 0000000..f803fa8 --- /dev/null +++ b/create_kaik_user_with_sudo_access.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +MY_SHELL=$( which bash ) + +/usr/sbin/useradd -c 'Kai Kewley ' -s ${MY_SHELL} -m kaik +cat >/etc/sudoers.d/kaik-ALL <~kaik/.ssh/authorized_keys +chmod 400 ~kaik/.ssh/authorized_keys +chown -R kaik ~kaik/.ssh \ No newline at end of file diff --git a/kaikewley_rsa.pub b/kaikewley_rsa.pub new file mode 100644 index 0000000..f24c3e3 --- /dev/null +++ b/kaikewley_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTaImIf071KBu+O5lhYqJ1Agafhx7bJYVIKiarALNJQo+EZcPtIckFgm84Hu3M0ajTF2NmVtL336LVt6ohXCd8tJ40LqciqsE1jX493fDSIVTSfLOI7CM4V/p1thd6Ism2gb6jxIJ4xDGA0M8jqLgBml0HCzZxevmekIdB5qyhlNInyHsebpB2hGlyWPdF6R5c55fL70mFHfWWfWbkuVIqhJ792IslLYpapV5Xat/or7z5BfovbrfgGIAGNCcpes5ylnf28mIo66JMrJhbvkPq6L4mxxOujqtaaUjCpx+a2IVDIM3VVstTTv2x8e77or9thSPq8MrMOUChfcJ+gvyD kaikewley@gmail.com