When creating a Compute Instance, you will not receive a root password. Authentication is based on secure SSH keys instead of using passwords.
SSH keys allow password-less authentication on secure shell (SSH) Connections.
This guide shows how to configure and enable a SSH key on Windows, MacOS or Linux computers.
- You have an account and are logged into console.scaleway.com
Before creating your first instance, you have to create a RSA key pair on your local computer. A RSA key pair consists of two elements:
The public key is kept in your Scaleway account and transferred to the instance during the boot process, while the private key is kept securely on your computer.
When connecting to the instance via SSH, a trusted connection to the machine is being established using the key pair. If there is a discrepancy between the keys or any of them is missing, authentication fails and a connection cannot be established.
Important: For security reasons you must generate a 2048-bit or 4096-bit RSA key. Older 1024-bit keys are no longer supported.
1 . Open the terminal application (command line) by clicking on the corresponding icon:
2 . Type the following command
ssh-keygen -o -b 4096 and press Enter to generate the new key:
-ooption was added in 2014; if this command fails for you, simply remove the
3 . Enter the file path in which to safe the key. Leave it at the default setting if you are creating your first key (which will be saved as id_rsa):
Enter file in which to save the key (/Users/me/.ssh/id_rsa):`
4 . Set a passphrase, this step is not mandatory but highly recommended for increased security. The passphrase can be freely chosen. If no passphrase is required, press Enter:
Enter passphrase (empty for no passphrase):
5 . Enter the passphrase again to confirm it. Then press Enter:
Enter same passphrase again:
6 . The key pair is being generated (a public key that we will copy on your instances, and a private key that you must keep secret). By default, the two files are located in the
The entire key generation looks like this
catcommand and copy it, as it is required for step 2:
1 . Download PuTTYgen to your local computer
2 . Launch PuTTYgen by double-clicking on the application:
3 . Select RSA, set the Number of bits in the key to 4096 and click the “Generate” button:
4 . Move the mouse around the blank area, as indicated, to generate some randomness:
5 . Two keys are generated (a public key that we will be copy on your instances, and a private key that you must keep secret):
Key-commentfield with a name to help you identify this key pair
1 . To connect to your instances, you must add a public key to your Project.
Save the content of the public key by clicking on Add a new SSH key on the Credentials tab of the Project Dashboard.
A pop up appears. Paste the key in the indicated box, add a description if necessary and click on Add a SSH key.
You are now ready to create and start your first instance!
- If you add a new SSH key into the console and can ssh your instance, reload your ssh-keys with
- If you add a new SSH key into the console and can not access your instance, reboot your instance from the Control Panel to load ssh-keys