Insert the flashed SD card into your Raspberry Pi. Attach your monitor and keyboard to the Pi and connect it to your power source. Then, follow the instructions on screen.
- Press enter to configure
- Press OK to configure the network and setup an admin account on this all-snap Ubuntu Core system
- If you are using ethernet you simply need to connect your ethernet cable and select done. If you are wanting to use a local wifi network, use the arrow keys on your keyboard to navigate to wlan0 and hit enter. Here you will be able to configure your wifi settings.
- Select “Done” and the network config will progress.
Note: For this simple tutorial you will only need to input your network SSID and password. Once you have done that you won’t need to do any other network configuration. Using DHCP for IPv4 is fine.
- Next, you will need to enter the email address that is connected to your SSO account
Note: Don’t dawdle, for security reasons if you’re inactive for more than a minute the Pi will ask you to start over.
Now, if you made an SSO account for the first time during this tutorial, you will not have any SSH keys. If you don’t have any SSH keys follow this next step. If you do, feel free to jump to the next section.
Generating an SSH key pair
For this, you need to open a terminal on your computer and run the following commands:
chmod 700 ~/.ssh
ssh-keygen -t rsa
This will generate a 2048-bit RSA key pair, which is secure enough for most use cases (you may optionally pass in the
-b 4096 flag to the
ssh-keygen command, to create a larger 4096-bit key). You’ll see what this actually means in a few moments.
After entering the command, you should see the following output:
Press ENTER to save the key pair into the
.ssh/ directory in your home directory or specify an alternate path.
If you had previously generated an SSH key pair, you may see the following prompt: “If you choose to overwrite the key on disk, you will not be able to authenticate using the previous key anymore.” Be very careful when selecting “yes”, as this is cannot be reversed and your existing key will be overwritten.
You should then see the following prompt:
Here, you enter a secure passphrase. A passphrase adds an additional layer of security to prevent unauthorized users from logging in.
You should then see something like the following output:
You now have a public and private key that you can use to authenticate. The next step is to place the public key on your Raspberry Pi so that you can use SSH-key-based authentication to log in.
So, now you will need to copy the contents of the file you just created to this site: https://login.ubuntu.com/ssh-keys
To do so you can run:
In the terminal and copy the result into the text field on the website. Click import and if you have copied everything correctly you will have the key set up.