---
title: SAPM SSH Key Rotation 
slug: singleconnect-reference-guide-3-1-0/sapm-ssh-key-rotation
description: Learn how to enhance security in SAPM by adding an SSH key to prevent unauthorized access with downloaded RSA Private Keys. This guide walks you through the step-by-step process, from accessing the SAPM Management section to establishing an SSH connection
docTags: 
createdAt: 2022-07-29T09:07:12.000Z
---

Even though the passwords for the privileged accounts are changed, rotated, or stored by the SAPM module, users who have downloaded RSA Private Keys for their accounts continue logging in to the systems with these private keys. To prevent this, SSH Keys can be changed by the SAPM module periodically as well.
To add an SSH key to SAPM:

1. Navigate to **SAPM Management&#x20;**>**&#x20;SAPM Management**.
2. Open the **SAPM Accounts** tab.
3. Enter the **Host**, **Change Period**, an&#x64;**&#x20;Username**.
4. Select **One of the SSH Key Types** as the **Configuration**. This action changes the Password field to an **RSA Private Key&#x20;**&#x66;ield.
5. Establish an SSH connection to the target device and copy the contents of the /home//.ssh/id\_rsa file (or any other path that includes the RSA Private Key for the user)
6. Paste the file into the **RSA Private Key** field.
7. Click **Save**.
8. Confirm the pop-up dialog box.

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/svfd24OaUCYdAeNxhbis1_image.png "SSH Key defining in the SAPM Accounts page")

The SAPM account will be saved and listed in the SAPM Accounts section. From this moment on, if the account type is dynamic, the SSH Key will be changed periodically. If the account type is static, the SSH Key will be unchanged.

The process of checking out and resetting the SSH Key is similar to any other SAPM account.