Skip to main content

SSH Keys Management

Introduction

Setting up SSH-based security to access your server is a much more effective way than the use of a manual root password. Cracking the security system of a node depending on SSH keys is nearly impossible since it secures your node in a more sophisticated way by the use of encoded keys.

Why is password-based authentication vulnerable?

A server can authenticate & grant access to the users with different access methods. The most basic of these is a password-based authentication, which is easy to use but isn’t the most secure.
Modern processing power combined with automated scripts makes brute-forcing a password-protected account very possible since passwords generally are not complex. SSH keys prove to be a reliable and secure alternative.

What are SSH keys?

SSH key pairs are two cryptographically secure keys that can be used to authenticate a client to an SSH server. Each key pair consists of a public key and a private key.

The private key is retained by the client on his local machine and should be kept secret. Any compromise of the private key will allow the attacker to log into servers that are configured with the associated public key without additional authentication. As an additional precaution, the key can be encrypted on disk with a passphrase.

The public key is uploaded onto the remote server that you want to be able to log into with SSH.
When a client attempts to authenticate using SSH keys, the server can test the client on whether they are in possession of the private key. If the key-pair matches, then a shell session is spawned, or the requested command is executed.

How do SSH keys work?

  • A key pair will be generated on your local PC.
  • Generating a key pair provides you with two long strings of characters: a public and a private key.
  • The public key will be added to your node.
  • The corresponding private key pair will be saved on your local PC.
  • Every time you access your node, the SSH system will look for the private key pair of the public key added to it. The system will unlock only when the two keys match.
  • You can also disable the root password after the SSH keys are set up.

Manage SSH Keys

This guide shows you how to access & manage your SSH keys in the E2E Networks My Account portal.

Logging into E2E Networks ‘My Account’

Please go to ‘My Account’ and log in using your credentials set up at the time of creating and activating the E2E Networks ‘My Account’.

After you log in to the E2E Networks ‘My Account’, you can click on the left side of the MyAccount dashboard, click on the “SSH Keys” sub-menu available under the services menu.

SSH Keys Menu

Add/Delete SSH Keys

SSH Keys Add/Delete

If you do not have SSH keys and want to create an SSH key pair to access your node, then follow the tutorial for your computer OS.

  • MAC
  • Windows
  • Linux

ADD SSH Keys

Click on the Add Key button.

Add SSH Key

You need to label your SSH key (optional) field for easy identification purposes.

You can either load the file to add the public SSH Key by clicking the ‘Load from file’ or paste the contents of your public SSH key (copy it as it is and paste it in) in the SSH Key content field.

Note

Before you paste your public SSH keys into your content field, you must check the format of each public SSH key file that you plan to add.

SSH Key Content

After adding the public key, you need to click the ‘Add Key’ button. You will be automatically routed to the ‘Manage SSH Keys’ page.

Similarly, you can store multiple SSH Public Keys into My Account & may assign them to the E2E node, which will be accessible to multiple users with different SSH keypairs.

Manage SSH Keys

Delete SSH Keys

To remove a public key, click on the delete button which will permanently delete your public key.

Delete SSH Key

Note

Any user accessing the node from the SSH keypair will not be able to access the node once the key is removed from My Account.

Using an SSH Key

Now the SSH key is added to your My Account which can be used with any new virtual compute node that you create in the future by simply selecting the public key during a virtual compute node creation process

SSH Key Usage

You can also refer enable/disable password-based authentication for SSH access to the server.

How to Add SSH Key to the Existing Nodes from My Account

Once you've added the SSH key to your My Account, you can attach it to existing nodes by selecting the key in node security settings. Alternatively, you can add a new key directly to an existing node through My Account using these steps:

Add SSH Key to Node

  • Navigate to My Account > Manage nodes
  • Choose the node where you wish to add the SSH key
  • Navigate to Node Security settings, then click "New" to add SSH keys directly to the chosen node.

Specify the key name and add its public key. After adding, select the key and click the nearby submit icon.

Submit SSH Key

How can you set your SSH key as the default while launching new nodes

You can configure the default SSH key to be added to all newly created nodes by following these steps:

  • Go to My Account settings -> General settings

General Settings

In the SSH keys column, specify the default SSH keys for all newly created servers. Additionally, we suggest you disable password authentication.

Default SSH Key

SSH Settings