Skip to Content
LogiStackDocs
Team and security

SSH keys

Generate or import ed25519 SSH keys in LogiStack for private Git repositories over SSH and for bootstrapping new servers, and copy their public keys.

LogiStack keeps a set of SSH keys for your organization. It uses them for two jobs: reading private Git repositories over SSH (as a deploy key), and connecting to a new server to add it as a node. The private half is encrypted at rest and never leaves the LogiStack server; you only ever copy the public half.

Everyone in the organization can see the keys and copy public keys. Only Owners and Admins can add or delete them.

Open SSH keys

In the sidebar, under Settings, select SSH keys.

The SSH keys page listing two ed25519 keys, Git deploy key and Server bootstrap, each with its public key, SHA256 fingerprint and a Copy public key button

Each row shows the name, when it was added, the start and end of the public key (ssh-ed25519 AAAAC3Nz…) and its SHA256 fingerprint.

Add a key

Open the dialog

Select Add SSH key.

Choose how to add it

Under How to add the key, pick:

  • Generate: a new ed25519 key, made on the server. Recommended.
  • Import: an OpenSSH private key you already have.

Name it

In Name, say what it opens, for example Git deploy key or Server bootstrap.

Paste the private key (import only)

For Import, paste the key into Private key, starting with -----BEGIN OPENSSH PRIVATE KEY-----. It must have no passphrase. Remove one with:

ssh-keygen -p -N '' -f ~/.ssh/id_ed25519

Create it

Select Generate key or Import key. The dialog shows "Git deploy key is ready" with the public key and its fingerprint.

Copy the public key

Copy the public key and add it where it should be trusted: a GitHub or GitLab deploy key, or a server's authorized_keys. Select Done.

You can copy the public key again any time with Copy public key on the key's row.

Use a key for a private Git repository

For a Git host that LogiStack doesn't integrate with, or when you prefer a deploy key to an app or token, connect the repository over SSH:

  1. Add an SSH key as above, for example Git deploy key.
  2. Add its public key as a read-only deploy key on the repository. On GitHub: the repository's Settings › Deploy keys › Add deploy key. On GitLab: Settings › Repository › Deploy keys.
  3. In LogiStack, go to Integrations › Git providers, add a provider and choose Any Git host over SSH.
  4. Enter the Repository URL in SSH form, for example [email protected]:acme/storefront.git or ssh://[email protected]:2222/acme/web.git, and pick your key in SSH key.
  5. Optional but recommended: paste the host's keys into known_hosts. Get them with:
ssh-keyscan github.com

Without known_hosts, LogiStack accepts whatever key the host presents. See Deploy from Git for the whole flow.

Use a key to add a server

When you select Add server under Monitoring, the wizard asks for an SSH key that LogiStack uses to connect and join the server to the cluster. Pick an existing key or generate one there. The wizard shows the command that installs the public key on the server, like:

On the new server
mkdir -p ~/.ssh && echo 'ssh-ed25519 AAAAC3Nz... ' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys

See Nodes for the rest of the steps.

Delete a key

  1. Select the trash button on the key's row.
  2. Confirm the deletion.

Repositories and servers that trust this key stop accepting it from LogiStack, so deploys from those repositories fail. The private key is erased and can't be recovered. Switch Git providers and servers to another key first.

Troubleshooting

  • Import fails. The key has a passphrase, or isn't an OpenSSH private key. Remove the passphrase with ssh-keygen -p -N '' -f <file>.
  • "Permission denied (publickey)" when cloning. The public key isn't on the repository, or it was added to a different repository. Copy it again with Copy public key.
  • "Host key verification failed". The known_hosts you pasted doesn't match the host. Run ssh-keyscan again for the exact host and port.

On this page