Configure secure access for instances (2/5)

Before launching an instance, you need to configure a security group. A security group is a set of IP filter rules that defines networking access and makes it possible to grant SSH access to users or be able to ping an instance. By modifying the default group or creating a new one you can attach a security group to (specific) instance(s). Key pairs are SSH credentials that are deployed into an instance when it's first deployed. Each project should have at least one key pair. A key pair can be used for multiple instances at the same time. If you already have a key pair or created one with another tool, you are able to import that key pair to your instance. After this section you should be able to import or create a key pair and add or create security groups.

Add rules to the default security group

Before you can access an instance by SSH and ICMP (ping) you need to apply some rules to all instances within a project. You always need to set up the following unless there is a particular reason to prohibit SSH or ICMP access to an instance.

  1. From your project in the dashboard go to the Compute tab and click Access & Security.
  2. You can see the available security groups for this project.
  3. Click Manage Rules and then Add Rule.
Add Security Rule

Enable SSH

To enable SSH access fill out the following: Rule: SSH Remote: CIDR CIDR:

Enable ICMP

To add ICMP (ping) access fill out the following: Rule: ALL ICMP Direction: Ingress Remote: CIDR CIDR:

Create a new key pair

If you wish to use a new key pair for your OpenStack platform, follow the steps below:

  1. Select your Project, now go to Compute and click Access & Security.
  2. In the tab access & security click above on Key Pairs.
  3. In the key pairs tab please click Create Key Pair.
  4. Give your key pair a name and click Create Key Pair.
  5. Your browser gives you a link for saving your name.pem file, save this file locally.
  6. Your key will be added automatically.

Import an existing Key Pair

If you wish to use an existing key pair, follow the steps below:

  1. Select your Project, now go to Compute and click Access & Security.
  2. Click on Key Pairs followed by Import Key Pair.
  3. Give your key pair a name.
  4. Paste your public key in the Public Key Field.
  5. Click Import Key Pair.

Was this article helpful?

Next article:

Create a cloud instance (3/5)

Before you create an instance you must be sure you have created a key pair. If you have a key pair and you need to know a little about selecting the right storage before you launch a new instance. You can configure a new ephemeral instance or a persistent instance. If you want to know the differences between these two, click the following link: How to choose the right OpenStack Storage.