# Authentication

> Source: https://parallelworks.com/docs/account-settings/authentication

# Authentication

## Managing API Keys

You can use an API key to access Parallel Works via its REST API. 

:::info Note

Please note that API keys act as an alternate means to access your account and should be treated with the same care as your login password.

:::

### Create an API Key

Navigate to your account settings (**Username** > **Account**).

![Screenshot of the user clicking Account.](/content-images/docs/account-settings/authentication/click-account.png)

On the next page, click **Authentication**.

![Screenshot of the user clicking the Authentication tab.](/content-images/docs/account-settings/authentication/click-auth.png)

Click **API Keys**.

![Screenshot of the user clicking API Keys in the Authentication tab.](/content-images/docs/account-settings/authentication/click-api-keys.png)

Click **Add Key**.

![Screenshot of the user clicking the Add API Key button.](/content-images/docs/account-settings/authentication/add-api-key.png)

Enter a **Key Name** for the new API key. 

If your organization permits users to select their own expiration date for API keys, use the **Expiration** dropdown menu to select when your key will expire. You can choose no expiration or a date in 7, 30, 60, or 90 days. Shorter expiration periods are more secure. 

Click **Add Key**.

![Screenshot of the user clicking the Add Key button.](/content-images/docs/account-settings/authentication/click-add-key.png)

Your new API key will be displayed on the next page. You can use the copy button  to copy and save the key in a secure place. Once you refresh or navigate away from this page, you won’t be able to see the key again. 

![Screenshot of the Authentication tab after clicking the Add Key button.](/content-images/docs/account-settings/authentication/new-api-key.png)

### Delete an API Key

Navigate to **Account** > **Authentication** > **API Keys** and click the delete icon  to remove an API key from your ACTIVATE account. 

![Screenshot of the user clicking the delete icon for an API key. ](/content-images/docs/account-settings/authentication/delete-api-key.png)

A dialog box will appear with more information about deleting your key. Click **Delete API Key** to confirm the deletion. The key will be removed from your account immediately.

## Managing Tokens 

You can create a short-term token and use it to authenticate our CLI after installing locally. These tokens last 24 hours, after which you will need to re-authenticate.

### Create a Token 

Navigate to your account settings (**Username** > **Account**).

![Screenshot of the user clicking Account.](/content-images/docs/account-settings/authentication/click-account.png)

On the next page, click **Authentication**.

![Screenshot of the user clicking the Authentication tab.](/content-images/docs/account-settings/authentication/click-auth.png)

Click **API Keys**.

![Screenshot of the user clicking API Keys in the Authentication tab.](/content-images/docs/account-settings/authentication/click-api-keys.png)

Click **Generate Token**.

![Screenshot of the user clicking the Add API Key button.](/content-images/docs/account-settings/authentication/click-generate-token.png)

If your organization permits users to select their own expiration date for tokens, use the **Expiration** dropdown menu to select when your key will expire. You can choose from 1 hour up to 24 hours in 1-hour increments. Shorter expiration periods are more secure. 

Click **Add Token**.

![Screenshot of the user clicking the Add Token button.](/content-images/docs/account-settings/authentication/click-add-token.png)

Your new token will be displayed on the next page. You can use the copy button  to copy and save the key in a secure place. Once you refresh or navigate away from this page, you won’t be able to see the key again. 

![Screenshot of the Authentication tab after clicking the Add Key button.](/content-images/docs/account-settings/authentication/new-token-screen.png)

## Managing SSH Keys 

You can add an SSH key to your ACTIVATE account, which will allow you to log in to any active cluster from any device with that SSH key on it.

### Create an SSH Key

Navigate to your account settings (**Username** > **Account**).

![Screenshot of the user clicking Account.](/content-images/docs/account-settings/authentication/click-account.png)

On the next page, click **Authentication**.

![Screenshot of the user clicking the Authentication tab.](/content-images/docs/account-settings/authentication/click-auth.png)

Click **SSH Keys**. 

![Screenshot of user clicking SSH Keys in the Authentication tab.](/content-images/docs/account-settings/authentication/click-ssh-keys.png)

Click **Add Key**.

![Screenshot of the user clicking the Add SSH Key button.](/content-images/docs/account-settings/authentication/add-ssh-key.png)

Use the **Key Name** field to give the key a unique name. Paste your public SSH key in the **Key** field. 

Click **Add Key**.

![Screenshot of the Authentication tab after pasting an SSH key and naming it.](/content-images/docs/account-settings/authentication/click-add-ssh.png)

You can now log in to any active cluster. Navigate to the terminal or command line on your device and enter `ssh -i /path/to/ssh/private/key username@IPaddress`:

```shell

parallelworks@Parallels-Macbook-Air sshtest % ssh -i ./id_rsa demo@34.135.24.147
Last failed login: Thu Mar  2 09:48:20 UTC 2023 from 60.94.197.104.bc.googleusercontent.com on ssh:notty
[demo@democluster-70 ~]$

```

### Copy an SSH Key 

In **Account** > **Authentication** > **SSH Keys**, click the clipboard icon  to copy your SSH key to your computer's clipboard. 

![Screenshot of the user clicking the clipboard icon.](/content-images/docs/account-settings/authentication/click-share-key.png)
