Before you launch an instance, you should add security group rules to enable users to ping and use SSH to connect to the instance. Security groups are sets of IP filter rules that define networking access and are can be applied to all instances within a project. To do so, you either add rules to the default security group or group or add a new security group with rules.
...
Note: A key pair belongs to an individual user, not to a project. To share a key pair across multiple users, each user needs to import that key pair.
Add a rule to a security group
This procedure enables SSH and ICMP (ping) access to instances. The rules apply can be applied to all instances within a given project, and should be set for every project unless there is a reason to prohibit SSH or ICMP access to the instances. This procedure can be adjusted as necessary to add additional security group rules to a project, if your cloud requires them.
...
Log in to the dashboard.
Select the appropriate project from the drop down menu at the top left.
On the Project tab, open the Network tab. The Security Groups tab shows the security groups that are available for this project.
Click Create Security Group to create a new one or select the default security group (the second choice is not recommended).
After choosing the security group, click Manage Rules.
To allow SSH access, click Add Rule.
In the Add Rule dialog box (fig), enter the following values:
Rule:
SSH
Remote:
CIDR
CIDR:
0.0.0.0/0
Click Add.
Instances will now have SSH port 22 open for requests from any IP address.
To add an ICMP rule, click Add Rule.
In the Add Rule dialog box, enter the following values:
Rule:
All ICMP
Direction:
Ingress
Remote:
CIDR
CIDR:
0.0.0.0/0
Click Add.
Instances will now accept all incoming ICMP packets.
Add a key pair
Create at least one key pair for each project.
...
It is recommended to insert the newly generated key in a text file, without extension, conventionally called id_rsa
. The file should be placed in the ".ssh
" folder, which should be located in the "Users \ nameUser \ .ssh" path. Moreover, if you want to change the permissions of the file, so that only you can read and write to the file, you can use the Linux chmod
command (in this case chmod 600
PrivateKey.pemid_rsa
).
Import a key pair
This procedure is an alternative to the one presented in the previous paragraph: you can generate a Key Pair on OpenStack and save the Private Key locally or, conversely, generate it locally and save the public part on OpenStack. To do this, you need to generate on the local machine, which you will use to connect via ssh, the key pair, using the command:
Code Block | ||||
---|---|---|---|---|
| ||||
$ ssh-keygen -t rsa -f myKeyPair.key |
...
The Compute database registers the public key of the key pair and the Dashboard lists the key pair on the Key Pairs tab.
Allocate a floating IP address to an instance
Info | ||
---|---|---|
| ||
This paragraph details the reservation of a floating IP address from an existing pool of addresses (allocation) and the association of that address with a specific instance. Since the association of the floating IP must be done with the instance, the association phase should be performed after the image has been instantiated. |
...