# urbestack-ssh-key-add

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-ssh-key-add --user NAME [--label TEXT] --key-stdin
```

## Description

Adds an SSH public key to a customer's list. Specify --key-stdin and pass one public key line on standard input in ssh-keygen format. Include the key type, the key data and an optional comment. Omit authorized_keys options. UrbeStack rejects DSA keys and checks the public key with ssh-keygen -l.

A label supplied with --label must be 1 to 64 printable ASCII characters. If --label is omitted or empty, UrbeStack uses the printable ASCII text of the key's comment, up to 64 characters, or the key type if the comment yields no label.

Each customer can keep up to ssh_keys_max keys, which defaults to 20. UrbeStack rejects a key whose fingerprint is already on that customer's list.

UrbeStack updates the customer's file under ssh_keys_dir immediately. sshd reads it alongside .ssh/authorized_keys in the customer's home directory.

## Same in the API

- [POST /users/{name}/ssh-keys](https://urbestack.com/docs/api/post-users-name-ssh-keys.md): Add an SSH public key for a customer

## Command family: ssh

- [urbestack-ssh-key-del](https://urbestack.com/docs/commands/urbestack-ssh-key-del.md): Removes an SSH public key from the customer's list and from UrbeStack's authorized keys file for that customer immediately.
- [urbestack-ssh-key-list](https://urbestack.com/docs/commands/urbestack-ssh-key-list.md): Lists the SSH public keys UrbeStack manages for a customer.
- [urbestack-ssh-key-set](https://urbestack.com/docs/commands/urbestack-ssh-key-set.md): Changes only the label of a customer's SSH public key in place.
