# Create Coop-Cloud Capsul and Login Using SSH

**Capsul** is software by [Cyberia Club](https://cyberia.club/) for "small virtual machine (vm) as a service."

1. Open <https://yolo.servers.coop> in your browser. Click on *Login* in the upper right corner.
![yolo home page](01-yolo-home-page.png "yolo home page")

1. Fill in your email address in the box. You will need to use this email address multiple times, so do not use a throw-away email address. Click the *Log In* button.
![yolo login page](02-yolo-login.png "yolo login  page")

1. Open your email client and look for a new email with subject **Click This Link to Login to Capsul** and open the email. 
![new email](04-email-click-this-subject.png "new email")
The email message contains an authorization link to your new account on yolo.servers.coop. Click the link, or copy and paste it into your browser's address bar.
![click link in email](05-email-click-this.png "click link in email message")

1. Back in your browser on the yolo servers website, click the *SSH & API Keys* link. There will be no front-end to your capsul. All access to it will be remote, for example, with *ssh*. You need to create SSH keys before you can create your capsul. 
![open SSH & API Keys](07-yolo-ssh-public-keys.png "open SSH & API Keys")

1. Create SSH Keys on your local Windows computer. This guide explains how to do so using Window's built-in OpenSSH feature. If you prefer [PuTTY](https://en.wikipedia.org/wiki/PuTTY), you can skip these steps and use that instead.
    1. Open an Administrator PowerShell window. 
    ![open administrator powershell on windows](08-win-admin-power-shell.png "open administrator powershell on windows")
    1. Use the *get-WindowsCapability* command to find out if Windows already has the OpenSSH client installed.
    ![is openssh client installed on windows?](09-win-is-openssh-installed.png "is openssh client installed on windows?")
    If you see "State : Installed" in the response, you don't need to add it. If it is not installed, use the *Add-WindowsCapability* command to add it.
    ![install openssh client on windows if needed](10-win-install-OpenSSH.png "install openssh client on windows if needed")
    1. Use the Windows command line:
        1. Open a cmd.exe window. 
        1. *cd* to your home directory. In this example, the home directory is c:\users\userid. 
        1. Use *dir* to discover if you already have a *.ssh* subdirectory in your home directory. 
        1. If necessary, use *mkdir .ssh* to create the subdirectory.
        1. Run *ssh-keygen.exe* to generate an SSH key pair. Press *enter* key to accept the default filename. Press *enter* key twice to skip adding a passphrase. Your key pair identification is then saved in the *.ssh* subdirectory. You will see a key fingerprint ending in `your-Windows-username@your-Windows-hostname`. You'll also see the key's randomart image.
        ![create ssh key using ssh-keygen.exe](11-win-ssh-keygen.png "create ssh key using ssh-keygen.exe")
    1. Launch Notepad.exe and open file *c:\users\userid\\.ssh\id_rsa.pub*. Select all of the file's contents and copy to the clipboard. ![copy public ssh key to clipboard using notepad.exe](12-win-notepad-cp-pub-ssh-key.png "copy public ssh key to clipboard using notepad.exe")

1. Return to the **SSH PUBLIC KEYS** page in your browser, find the box labeled *File Contents* and paste your public key from the clipboard into the box. Then, click the *Upload* button. ![paste public key into yolo SSH PUBLIC KEYS page](13-yolo-paste-public-key.png "paste public key into yolo SSH PUBLIC KEYS page")

1. Your uploaded public key will appear near the top of the page. ![your uploaded public key appears on yolo page](14-yolo-SSH-key-uploaded.png "your uploaded public key appears on yolo page")

1. Add funds to your account.
    1. Click the *Account Balance* link. The method used for payment is called Stripe. 
    1. Click on the *Add funds with the Credit/Debit (stripe)* link. Fill in an amount in the box. For example, $20. 
    1. Click on *Pay with Stripe*.
    1. Your browser will open the Stripe page. Fill in your email address and your card information. You have the option to save the information so you can pay faster next time.
    1. Click the *Pay $20.00* button when done. Wait for it to verify your payment.
    1. Return to the *Account Balance* section and verify your ACCOUNT BALANCE

1. Click the *Capsuls* link, and the *Create one!* link. This will open the **CREATE CAPSUL** page.
    1. You will see your *account balance*
    1. Pick a Capsul Size from the drop-down box. This screenshot shows size *f1-xs* selected.
    1. Leave *Debian 10 (Buster)* as the operating system; it's the only one available for Capsuls at this time.
    1. Put a check mark in the box next to the name of your public SSH key. In this screenshot, it's named *user-name@host-name*.
    1. Click on the *Create* button.
    1. Wait for your Capsul to be created and initialized. It shouldn't be more than a minute.
    ![Create capsule](15-yolo-create-capsule.png "Create capsule")
1. Check out your new Capsul!
    1. Click the Capsul *id* link, which is capsul-fk46nit117 in this example. ![capsule created](16-yolo-capsule-created.png "capsule created")
    1. You'll see the details for your new Capsul. You will need two items from this page for later: the *IPv4 Address* (a.k.a. ip address) and the **SSH HOST KEY FINGERPRINTS**.
    ![capsule details](17-yolo-capsule-details.png "capsule details")
    1. It's recommended you copy the fingerprints into a plain text file; Notepad is fine for this: ![save capsul host fingerprints](18-win-notepad-host-fingerprints.png "save capsul host fingerprints")

1. Remotely login to your new Capsul using ssh.
    1. Open a cmd.exe window
    1. Run ssh command. The name of the Linux user on the Capsul is **user**. You'll use the IPv4 address from a previous step.
    1. When you run the ssh command, you'll see a line saying the authenticity of the host can't be established. It will show you the key fingerprint.
    1. Use the mouse to copy the fingerprint string to the clipboard
    1. Open the Capsul fingerprints text file you saved in the previous step.
    1. Search for the key fingerprint by pasting it from the clipboard into the text editor's search query box. You should see that the fingerprint from the ssh command matches the fingerprint you saved when you created your Capsul.
    1. If it matches, enter "yes" in the command line window prompt "Are you sure you want to continue connecting".
     ![run ssh and match fingerprints](19-win-match-ssh-fingerprint.png "run ssh and match fingerprints")
    1. You are now logged into your remote Capsule. ![first capsule login](20-win-first-capsul-login.png "first capsule login")
    1. The default login shell for **user** is dash. If you prefer the bash shell, you can change it with the chsh command, as shown:
    ![change default shell to bash](21-capsul-change-to-bash-shell.png "change default shell to bash")

***Congratulations!*** You have created your remote Capsul and logged into it from your local Windows computer.