How to log in to your instance (5/5)
instance ssh rdp

How to log in to your instance (5/5)

After you have created your instance, you probably want to connect to it remotely. For Linux instances you need to use SSH (Secure Shell) and for Windows instances you need to create a RDP session (Remote Desktop Protocol). If you want to connect remotely to your instance from outside of your network you need to allocate and assign a floating IP first.

Connect to a linux instance with an imported Key Pair

For most new images the username is the distribution name with lowercase, for example: Ubuntu 18.04 is ubuntu and Fedora 27 would be fedora. You can connect to your instance with one of these examples:
  • If your instance is Ubuntu:
    ssh ubuntu@FLOATING_IP
  • If your instance is Ubuntu and you want to use a specific SSH key:
    ssh -i .ssh/id_rsa ubuntu@FLOATING_IP
  • If your instance is CentOS:
    ssh centos@FLOATING_IP
  • If your instance is Debian:
    ssh debian@FLOATING_IP
  • When confronted with the following warning, you can select yes.

    The authenticity of host "FLOATING_IP (FLOATING_IP)" can't be established.
        RSA key fingerprint is 17:7f:a9:ae:9d:6c:76:bf:be:68:a4:05:f6:da:84:7b.
        Are you sure you want to continue connecting (yes/no)? yes
        Warning: Permanently added "FLOATING_IP" (RSA) to the list of known hosts.

Connect to a linux instance with a generated Key Pair

  1. Download your keypair (.pem) locally, for example to your .ssh folder.
  2. Open your Terminal.
  3. Browse to your earlier stored .pem file.
  4. Run the following command to protect your key pair file.
    chmod 400 KEYPAIR_NAME.pem
  5. You are now able to connect to your Linux instance with the following command:
    • If your instance is Ubuntu:
      ssh -i KEYPAIR_NAME.pem ubuntu@FLOATING_IP

Making your Windows instance available for Remote Desktop Protocol (RDP)

Before your Windows instance can be used with RDP, you need to open port 3389. This port is used for RDP connectivity and traffic should be allowed for this port.

  1. Open the Horizon dashboard and go to “Access & Security”.
  2. Click the “Manage Rules” button that belongs to the default security group or to one of your custom security groups.
  3. Click the “Add Rule” button.
  4. From the "Rule" dropdown, select "RDP" and click on "Add"

Connect to a Windows instance from a mac machine using CoRD Remote Desktop

CoRD is a Mac OS X remote desktop client for Microsoft Windows computers using the RDP protocol. It's easy to use and free. You can download it from the CoRD website. Note: If you open CoRD you can fill in your public key. A new window will open with your instance. If you receive an error please ensure that you have opened port 3389 and assigned it to your Windows Instance.


Connect to a Windows instance from a windows machine using Remote Desktop Protocol (RDP)

  1. Browse to your Remote Desktop Connection shortcut in the start menu:
    • Start > All Programs > Accessories > Remote Desktop Connection
  2. Fill in your instance's Public IP in the computer field
  3. After this RDC will ask for your credentials.
    • Select Use Another Account.
    • Enter your credentials. RDP connection

This is the last part of our 'Getting started with OpenStack' tutorial. You may be interested in our other tutorials.

Was this article helpful?