Refresh the Account-level SSH Key Pair using API version 2

PUT api/v2/accounts/ssh_key

Use this API to set a new unique SSH key pair for your account. The API does not take any parameters and returns the public key component of the new key pair.

Qubole generates a unique SSH public-private key pair for every new account. You must add the public key from this key pair to the authorized key file (~ec2-user/.ssh/authorized_keys) in your account’s bastion host. Qubole uses the private key to create an SSH tunnel to the bastion host.

This API allows you to reset the unique SSH key pair to a new value (or to set an initial value).

Note

The API only returns the public key component of the key pair. As the private key is not visible to you (it is stored securely within the Qubole application), you cannot use this key pair to log in to the bastion host. You must additionally use a custom SSH key for the same.

If the unique SSH key feature is not enabled, the default Qubole public key is used to SSH into the bastion host. For more details, see Configuring a Cluster in a VPC with Public and Private Subnets (AWS).

Whenever you refresh the public SSH key, ensure that you also update it on the bastion host. For more information on adding the unique public SSH key, see Configuring a Cluster in a VPC with Public and Private Subnets (AWS).

Caution

The newly generated SSH key pair overrides the previously generated SSH key pair.

Parameters

None

Request API Syntax

curl -X PUT -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" -H "Accept: application/json" \
"https://<QDS environment>/api/v2/accounts/ssh_key"

Note

The above syntax uses the QDS environment as the placeholder. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample API Request

Here is a sample request to see the account-level public SSH key of a QDS account in the https://us.qubole.com environment.

curl -X PUT -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" -H "Accept: application/json" \
"https://us.qubole.com/api/v2/accounts/ssh_key"

Sample API Response

Here is a sample response.

{"status_code":200,"status":"Successfully created ssh keypair of length: 2048 and type: rsa","public_key":"<public key>"}