mirror of
				https://github.com/rorydavidson/ssh_access.git
				synced 2025-10-31 16:24:04 +01:00 
			
		
		
		
	Inital commit.
This commit is contained in:
		
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								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 | ||||
| ``` | ||||
|   | ||||
							
								
								
									
										14
									
								
								create_kaik_user_with_sudo_access.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								create_kaik_user_with_sudo_access.sh
									
									
									
									
									
										Executable 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
									
								
							
							
						
						
									
										1
									
								
								kaikewley_rsa.pub
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTaImIf071KBu+O5lhYqJ1Agafhx7bJYVIKiarALNJQo+EZcPtIckFgm84Hu3M0ajTF2NmVtL336LVt6ohXCd8tJ40LqciqsE1jX493fDSIVTSfLOI7CM4V/p1thd6Ism2gb6jxIJ4xDGA0M8jqLgBml0HCzZxevmekIdB5qyhlNInyHsebpB2hGlyWPdF6R5c55fL70mFHfWWfWbkuVIqhJ792IslLYpapV5Xat/or7z5BfovbrfgGIAGNCcpes5ylnf28mIo66JMrJhbvkPq6L4mxxOujqtaaUjCpx+a2IVDIM3VVstTTv2x8e77or9thSPq8MrMOUChfcJ+gvyD kaikewley@gmail.com | ||||
		Reference in New Issue
	
	Block a user