SSH key setup

Published

Updated

🔑

SSH keys intro and setup.

Create an SSH key pair with ssh-keygen -t ed25519 and add the public key to the fortrabbit account. It logs in to SSH, SFTP and rsync without a password.

About SSH keys

An SSH key pair logs in without a password. The private key stays on the local machine, the public key goes into the fortrabbit account. fortrabbit uses SSH keys for SSH, SFTP, rsync and scp.

~/.ssh/
├── id_ed25519        # private key, keep it secret
└── id_ed25519.pub    # public key, add it to fortrabbit
shell

Check for an existing key

ls ~/.ssh
shell

A pair like id_ed25519 and id_ed25519.pub, or the older id_rsa and id_rsa.pub, can be used. Then add the public key to the account.

Create a key pair

ssh-keygen -t ed25519 -C "me@fortrabbit"
shell

The -C comment only labels the key, use any text. Set a passphrase when asked, and store it in the system keychain or a password manager. Then copy the public key and add it to the account:

cat ~/.ssh/id_ed25519.pub
shell

Use a specific key

When the key is not in the default location, name it:

ssh -i ~/.ssh/other_key {{app-env-id}}@ssh.{{region}}.frbit.app
shell

Windows

Windows 10 and 11 ship OpenSSH: run the same ssh-keygen command in PowerShell or in Git Bash from the official Git installer. Keys created with PuTTY use their own format and need converting before ssh and git can use them, so create the key with ssh-keygen.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗