> ## Documentation Index
> Fetch the complete documentation index at: https://docs-freessh.vercel.app/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH Key Management

> Generate, import, and use SSH keys for saved connections.

Use the **Keys** section to manage credentials for key-based SSH authentication.

## What You Can Do

* Generate new key pairs
* Import existing private keys
* Rename and delete saved keys
* Export public keys to remote hosts

## Generate a Key

1. Open **Keys**
2. Create a new key pair
3. Save with a clear name (example: `personal-ed25519`, `prod-deploy`)

Use distinct keys by environment where possible.

## Import an Existing Key

You can import by:

* pasting private key content
* selecting a key file from disk

If the key is encrypted, provide its passphrase.

## Use a Key in Connections

In a connection form:

1. Set authentication to **Public Key**
2. Select a saved key
3. Click **Save & Connect** (or **Save Changes** when editing)

## Export Public Key to Host

FreeSH can append your public key to remote `authorized_keys`.

If export fails, review the backend error details shown in UI.

## Related Guides

* [Export Public Key to Host](/keys/export-to-host)

## Troubleshooting

See [SSH Keys Troubleshooting](/troubleshooting/keys-troubleshooting).
