Last active
April 24, 2018 18:15
-
-
Save cbluth/1c2ad8341af736b02368f8170d6d4b9d to your computer and use it in GitHub Desktop.
This file contains 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
normal-user@ubuntu:~$ sudo -i | |
root@ubuntu:~# lastlog | grep cobin | |
root@ubuntu:~# adduser cobin | |
Adding user `cobin' ... | |
Adding new group `cobin' (1001) ... | |
Adding new user `cobin' (1001) with group `cobin' ... | |
Creating home directory `/home/cobin' ... | |
Copying files from `/etc/skel' ... | |
Enter new UNIX password: # create a password | |
Retype new UNIX password: # same password | |
passwd: password updated successfully | |
Changing the user information for cobin | |
Enter the new value, or press ENTER for the default | |
Full Name []: # Accept all defaults here, for speed | |
Room Number []: | |
Work Phone []: | |
Home Phone []: | |
Other []: | |
Is the information correct? [Y/n] | |
root@ubuntu:~# lastlog | grep cobin | |
cobin **Never logged in** | |
root@ubuntu:~# su - cobin | |
cobin@ubuntu:~$ pwd | |
/home/cobin | |
cobin@ubuntu:~$ ssh-keygen -t rsa -N "" | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/home/cobin/.ssh/id_rsa): | |
Created directory '/home/cobin/.ssh'. | |
Your identification has been saved in /home/cobin/.ssh/id_rsa. | |
Your public key has been saved in /home/cobin/.ssh/id_rsa.pub. | |
The key fingerprint is: | |
SHA256:bg8mdtIfCrWcI33pMIcKt+jiZfA7292TqESYBF6LvhE cobin@ubuntu | |
The key's randomart image is: | |
+---[RSA 2048]----+ | |
|. . | | |
|..o . | | |
| E.. | | |
|...o | | |
| o+ . S | | |
| o+ * + . | | |
| . * Q.^.= | | |
| .+.B.%o% . | | |
| ..o*== o.+ | | |
+----[SHA256]-----+ | |
cobin@ubuntu:~$ echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGzK5Seh7wST+yWMjLQx6dd+P0LHxjJuRpk4QtfvI40AaypNGXJXotgS4VDAx7nw7tSWchkydwll8Y/+88lvK59/d/ZEj2okr+R5nwILXA2hWByVegO+/ztYA0+e/OEJySRFX6NFm37+a40iBAmnzPoqScgW0qHYWYOuCKxAZoQS4GyZQOdwdUlqedrV2t/dEOlRlbnlT0AQHqcSX7ocsoaIcyHMdJXe/VDMASWRQCG6LGP9lZTuljNgq5vpgiQ/q8mv+MJQUdC9A5W92Y82wvlSwJfAO6QEFVBvGyJmoCqzItBNPHnU9HwXrXh7IuNdLl3Fwl4CIT+zk9QZqknqPx cbluth@bb' >> ~/.ssh/authorized_keys | |
cobin@ubuntu:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment