You can use public/private key pairs to authenticate with your Linux virtual machines.
Generating SSH keys
The most popular way to generate public/private key pairs on Windows is to use PuTTYgen (available from the official site).
To generate new key pairs, click on the Generate button and then move your mouse around the blank area to generate randomness.
After generating the key pairs, a public key will be visible at the top of the window. This is the key you need to paste in OneStepCloud. To authenticate with a virtual machine, you'll need a private key. To save your private key, click on the Save private key button.
To generate public/private key pairs on Linux, open a console and type:
ssh-keygen -t rsa -b 4096 -f onestepcloud
Type a password to protect your keys and wait for keys to be generated. After it's finished, two new files will be created:
- onestepcloud - your private key file,
- onestepcloud.pub - your public key file that has to be pasted in OneStepCloud.
Viewing SSH keys
To view your public keys, go to SSH keys tab in Account Settings (right top).
Adding SSH key
To add new SSH key, click on the Add SSH key button. Fill in the title and key fields and click on the Add key button.
Deleting SSH key
To delete SSH key, click on the trash icon.
Adding SSH key to virtual machine
It's only possible to add SSH key to a virtual machine when it's not yet configured. Go to the virtual machine configuration window, check Use private key for authentication checkbox and select public key from the list.
Using private key to authenticate
If you have OneStepCloud or OpenSSH generated key (and if you want to use PuTTY)
Open PuTTYGen (PuTTY Key Generator) from PuTTY suite
Select "Conversions" => "Import key" and find your key.
Click "Save private key" and choose location to save the key file on your computer.
Configuring SSH authentication using a private key is dependent on using a SSH client. In case of Windows, most popular SSH client is PuTTY. Open PuTTY, type the public address IP and select SSH protocol.
Next, select Connection -> SSH -> Auth tab and browse for your private key.
Now go back to the Session tab, type the name for this session and click Save.
To SSH to your virtual machine using a private key, open a terminal and type:
ssh -i location_to_onestepcloud_private_key username@public_address