Accessing the Digital Ocean VM
For the C09 homework 2, 3 and the project, we are providing you with a VM on Digital Ocean. You will access this VM using an SSH key pushed to your Github account.
[important] Each VM is tied to your Github repository name. Do not ever rename your Github repository. This will duplicate your VM and we might cut your access permanently.
-
Get your SSH Public key of your SSH client.
If you are on Linux or Mac it is the file
~/.ssh/id_rsa.pubThe SSH public should look like this (ed25519 version):
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKmnmPgELBZTuNV3FcdDOOBifTCl1C8BTPB0M8iLK7Kz john.doe@example.comor (rsa version)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCnc7TQ8ccdXDCsNXgX1eNtVwvIR110Gzcu6iC9ErR68f7GYF6rsDHmgOZut+6SyU7TEgGA6y6Tqt+9OMs5XV3Epj90IdhPMUNxgfHCaYf9EQczMKKcwkeoR/FhcypGMu4y8gOyYZedlaecSBEvddWmVEwyYXtLjW1X0e7CYGzdZVUDJ6V8cuBQB+rM6NMkcVYWS+ZPTpwZESselLAGwC8SjwjN/6OCyvTpnTaRwBiczbQOB8KbEWW+Paoex4z4rATJ8PLjPl5TQO24sYLWrQgWNHWvcdzbKYT8VSxmq70opMl6GlTyUCOwbbHjFW4k69pQCdoVv5rAEdv9la+s5frxdeDi+NltsA9UCKKzjciuTMxl2Oy8mC8cMv4DvbYEPW0+E2yaMXM3Et3UO58Z+uNnavJCFXIMT4le7czqU+Mwm4qZf5lTlmJeZHx+gVWAf9dm0RV/tPAkKmsnSr01l1/0xzPuhCCRTKjs20ELWAKD05Oeqmcfnk6rTZV6n7GtXnU= john.doe@example.comThe last part if the key
john.doe@example.comcan be any kind of text string, it does not matter actually.You can share your public key with anyone and/or copy it on any machine. Nobody can do anything with just your public key. However, do keep your private key safe (
~/.ssh/id_rsa). Never share or copy your private key anywhere.If you do not yet have a SSH key, you may follow instructions here to generate one.
-
Copy all SSH Public keys in a file called
./SSH_KEYSpushed to your Github project repo, the one created through Github Classroom.Make sure to have one key per line. The
./SSH_KEYSshould look like this:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKmnmPgELBZTuNV3FcdDOOBifTCl1C8BTPB0M8iLK7Kz john.doe@example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAeCz0aA/FKnWUzssML1Eu2LtLuT9YgpYbjtf8UfM6AX jane.doe@example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEdkyWGCfLva+23XyUtZ1NElPtXk/FfWKZk0GYZGuTU3 justa.doe@example.comFYI, there is a script that collects those keys and update your VM every hour. Therefore, once your file has been pushed to Github it can take up to 1h to get updated and grant you access to your VM.
-
Access your VM using your SSH client.
Replace
repo_namewith the name of your repo:ssh root@repo_name.amazingcloud.spaceOr if you want to pass the private key to the command:
ssh -i /path/to/my\_private\_key root@repo_name.amazingcloud.space
Installing Docker on the Digital Ocean VM
-
Install Docker on your VM following these instructions here.
-
Make sure that docker is working:
docker run --rm hello-world
- You can learn more about how to use Docker here
