Rescuing an SSH Key Secured Cloud Server
Rescuing and accessing a VM that utilizes SSH Key based auth.
NOTE: These steps will work with any server - it does need to be an SSH Key Secured Cloud Server to allow you to use the 'Rescue with Specified Image' call.
Securing your Cloud Servers with SSH Key based authentication is a recommended security enhancement, and some image types require SSH Keys such as newer Ubuntu images. However, this can create problems when you attempt to put your server into Rescue Mode.
This guide will show you how to get around the issues with access involved with Rescued Cloud Servers using SSH Key based auth.
Using Pitchfork to Initiate Rescue Mode
- Navigate to https://pitchfork.rax.io which is the URL for our Pitchfork API GUI.
- Log into Pitchfork with your Rackspace Cloud username and the API Key.
- Navigate to the Cloud Images section from the list of Available Products.
- Select your server's Region from the drop down at the top.
- Click the GET button next to the listed item called List Images
- Click the Send API Call button to send the API call.
- Look into the Response Body section that appears. You'll want to find an image ID that does not require SSH Key based auth. For example, Ubuntu 20.04. Below is the response section that gives details on the Ubuntu 20.04 base image. We are concerned with the field named just "id" which has a value of
f0927f2c-7b84-4bc9-ac8c-a0891ffb16d4
copy this value somewhere.-
{ "com.rackspace__1__options": "0", "container_format": "ovf", "min_ram": 256, "updated_at": "2021-11-24T18:47:12Z", "self": "/v2/images/f0927f2c-7b84-4bc9-ac8c-a0891ffb16d4", "vm_mode": "hvm", "file": "/v2/images/f0927f2c-7b84-4bc9-ac8c-a0891ffb16d4/file", "flavor_classes": "*,!onmetal,!onmetal2", "owner": null, "com.rackspace__1__release_id": "ubuntu_20.04_lts_cloud", "com.rackspace__1__build_core": "1", "id": "f0927f2c-7b84-4bc9-ac8c-a0891ffb16d4", "size": 733353015, "os_distro": "ubuntu", "org.openstack__1__os_distro": "com.ubuntu", "hypervisor_version_requires": ">=6.2", "image_type": "base", "org.openstack__1__os_version": "20.04", "disk_format": "vhd", "com.rackspace__1__platform_target": "PublicCloud", "com.rackspace__1__build_managed": "1", "org.openstack__1__architecture": "x64", "schema": "/v2/schemas/image", "status": "active", "com.rackspace__1__visible_core": "1", "tags": [], "com.rackspace__1__ui_default_show": "True", "com.rackspace__1__release_build_date": "2021-11-23_20-43-23", "visibility": "public", "auto_disk_config": "disabled", "img_config_drive": "mandatory", "min_disk": 10, "com.rackspace__1__release_version": "10", "com.rackspace__1__visible_managed": "1", "virtual_size": null, "name": "Ubuntu 20.04 LTS (Focal Fossa) (Cloud)", "com.rackspace__1__build_rackconnect": "0", "checksum": "2727f14289067a571a43c12f457ca59c", "created_at": "2021-11-23T20:43:24Z", "cache_in_nova": "True", "com.rackspace__1__build_config_options": "rack_user_only,base_mgdops_config,mailgun,backup_agent_only,backup_defaults,monitoring_agent_only,monitoring_defaults,updates", "protected": true, "com.rackspace__1__visible_rackconnect": "0", "os_type": "linux", "com.rackspace__1__source": "cloud-images.ubuntu.com" },
-
- Now, click Cloud Products from the toolbar and select Navigate to the Servers section from the list.
- Select your server's Region again.
- Scroll down to the Rescue Server with Specified Image section and click the POST button.
- Enter your server's UUID in the
server_id
field and then image ID we obtained from the previous steps in therescue_image_uuid
field. - Click Send API Call to initiate the Rescue action.
- You'll receive a Response Body to your Pitchfork Call and the password for the Rescue Mode will be listed there similar to what you see here:
-
{ "adminPass": "m7UKdGiKFpqM" }
-
- Now, back in your Cloud Control Panel you'll see your server entering Rescue Mode. Once it's finished you'll be able to access it with the adminPass from the API Call Output.
Updated 23 days ago