Este contenido no está disponible en el idioma seleccionado.

Chapter 9. Connecting to an instance


You can access an instance from a location external to the cloud by using a remote shell such as SSH or WinRM, when you have allowed the protocol in the instance security group rules. You can also connect directly to the console of an instance, so that you can debug even if the network connection fails.

Note

If you did not provide a key pair to the instance, or allocate a security group to the instance, you can access the instance only from inside the cloud by using VNC. You cannot ping the instance.

Note

To execute openstack client commands on the cloud, you must specify the name of the cloud detailed in your clouds.yaml file. You can specify the name of the cloud by using one of the following methods:

  • Use the --os-cloud option with each command, for example:

    $ openstack flavor list --os-cloud <cloud_name>
    Copy to Clipboard Toggle word wrap

    Use this option if you access more than one cloud.

  • Create an environment variable for the cloud name in your bashrc file:

    `export OS_CLOUD=<cloud_name>`
    Copy to Clipboard Toggle word wrap

9.1. Accessing an instance console

You can connect directly to the VNC console for an instance by entering the VNC console URL in a browser.

Prerequisites

  • The administrator has created a project for you and they have provided you with a clouds.yaml file for you to access the cloud.
  • You have installed the python-openstackclient package.

Procedure

  1. To display the VNC console URL for an instance, enter the following command:

    $ openstack console url show <vm_name>
    +-------+------------------------------------------------------+
    | Field | Value					     	        |
    +-------+------------------------------------------------------+
    | type  | novnc					               |
    | url	| http://172.25.250.50:6080/vnc_auto.html?token=       |
    |	| 962dfd71-f047-43d3-89a5-13cb88261eb9         	  |
    +-------+-------------------------------------------------------+
    Copy to Clipboard Toggle word wrap
  2. To connect directly to the VNC console, enter the displayed URL in a browser.

9.2. Logging in to an instance

You can log in to public instances remotely.

Prerequisites

  • You have the key pair certificate for the instance. The certificate is downloaded when the key pair is created. If you did not create the key pair yourself, ask your administrator.
  • The instance is configured as a public instance. For more information on the requirements of a public instance, see Providing public access to an instance.
  • You have a cloud user account.
  • The administrator has created a project for you and they have provided you with a clouds.yaml file for you to access the cloud.
  • You have installed the python-openstackclient package.

Procedure

  1. Retrieve the floating IP address of the instance you want to log in to:

    $ openstack server show <instance>
    Copy to Clipboard Toggle word wrap

    Replace <instance> with the name or ID of the instance that you want to connect to.

  2. Use the automatically created cloud-user account to log in to your instance:

    $ ssh -i ~/.ssh/<keypair>.pem cloud-user@<floatingIP>
    [cloud-user@demo-server1 ~]$
    Copy to Clipboard Toggle word wrap
    • Replace <keypair> with the name of the key pair.
    • Replace <floating_ip> with the floating IP address of the instance.

      Tip

      You can use the following command to log in to an instance without the floating IP address:

      $ openstack server ssh --login cloud-user \
       --identity ~/.ssh/<keypair>.pem --private <instance>
      Copy to Clipboard Toggle word wrap
      • Replace <keypair> with the name of the key pair.
      • Replace <instance> with the name or ID of the instance that you want to connect to.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat