---
title: "addSshKey"
canonical: "https://support.appfire.com/space/SCLI/73370915/addSshKey"
format: markdown
---
See also: [Actions](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73368507)

> Macro (details)
> 
> | **Description** | Add an SSH key for a user. |
> | --- | --- |
> | **Required Parameters** | [userId](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73368641), [file](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73370741) |
> | **Optional Parameters** | [encoding](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73368755) |
> | **Type** | [Create](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73370540/Action+Types#ActionTypes-Create) |
> | **Category** | [Credentials](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73371318/Action+Categories#ActionCategories-Credentials) |
> | **Output Formats** |  |
> | **Replacement Variables** | sshKeyId |
> | **Hosting** | server,datacenter |
> | **Since Version** |  |
> | **Examples** | [addSshKey](https://appfire.atlassian.net/wiki/spaces/SCLI/pages/73371753/Examples#Examples-addSshKey) |

## Related How To's

> Macro (cql-query)