Ghost docs
Connecting over SSH

Generating an SSH key

Create an Ed25519 key pair and load it into the agent.

Check first — you may already have one:

ls -al ~/.ssh

A pair is two files with the same name: id_ed25519 (private, never share it) and id_ed25519.pub (public, the one Ghost wants). If you have those, skip to adding it to your account.

Create the pair

ssh-keygen -t ed25519 -C "you@example.com"

Press enter to accept the default location. When it asks for a passphrase, type one: the passphrase is what stops a stolen laptop from being a stolen push.

Ed25519 is short, fast and supported everywhere. If a machine you have to use is too old for it, ssh-keygen -t rsa -b 4096 also works — Ghost refuses RSA keys below 2048 bits.

Let the agent hold it

The agent keeps the unlocked key in memory so you type the passphrase once per session rather than once per push.

eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519

Add it to ~/.ssh/config so it survives a reboot:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Next: add the public half to your account.

On this page