---
title: "Generating SSH Keys on Mac"
description: "Create an SSH key pair on macOS and add its public key to Userify."
url: "https://userify.published.dev/docs/generating-ssh-key-mac.md"
canonical_url: "https://userify.published.dev/docs/generating-ssh-key-mac"
section: "Docs"
updated: "2026-12-01"
---

> Breadcrumbs: Docs > Generating SSH Keys on Mac
> Sitemap: https://userify.published.dev/docs/sitemap.md
> LLMS index: https://userify.published.dev/docs/llms.txt

# Generating SSH Keys on Mac

macOS includes OpenSSH. This guide covers a key pair that you create on your Mac.

If you already have a key at the default location, do not overwrite it unless
you intend to replace it. Choose another filename when `ssh-keygen` asks where
to save the new key.

```bash
ssh-keygen -t ed25519
```

When the command asks where to save the key, press Enter to use the default path. If a key already exists there, choose a different filename unless you intend to replace it. If you choose another filename, replace `id_ed25519` in each later path and command.

When prompted, use a long passphrase made from at least five or six randomly
chosen words. You can leave the other prompts blank.

An SSH agent or macOS Keychain can remember an unlocked key. The setup and when
you need to enter the passphrase depend on your macOS and SSH client settings.
If you forget the passphrase, you cannot recover it. Create a replacement key
and add its public key to Userify; keep your existing key until the replacement
works.

By default, this creates your SSH *private* key at `~/.ssh/id_ed25519` and your *public* key
at `~/.ssh/id_ed25519.pub`. The `.pub` file is the public key. Here, `~` means
your macOS home directory.

Copy only the public key into Userify. Keep the private key on your computer.
Display the public key with:

```bash
cat ~/.ssh/id_ed25519.pub
```

After Userify has access to your public key, connect to the server with:

```bash
ssh -i ~/.ssh/id_ed25519 YourUserifyUsername@ServerIP
```

Replace `YourUserifyUsername` and `ServerIP` with your Userify username and the
server address. Your SSH client may ask for your key's passphrase.

## Continue reading
- Previous: [Generating SSH Keys on Linux](https://userify.published.dev/docs/generating-ssh-key-linux.md)
- Next: [Generating SSH Keys on Windows](https://userify.published.dev/docs/generating-ssh-key-windows.md)

## Section links
- [Docs home](https://userify.published.dev/docs)
- [LLMS index](https://userify.published.dev/docs/llms.txt)
- [Sitemap](https://userify.published.dev/docs/sitemap.md)