# SSH keys

Source: https://bflops.com/docs/ssh-keys

Make an SSH key on macOS, Linux or Windows and paste its public half into bFLOPS.



An SSH key is a pair of files: a private key that stays on your computer, and a public key you give to bFLOPS. The machine lets in only the computer that holds the private key.

## Check for a key you already have [#check-for-a-key-you-already-have]

```bash title="macOS, Linux, Windows PowerShell"
ls ~/.ssh/*.pub
```

If it lists a file such as `id_ed25519.pub`, skip to [Copy the public key](#copy-the-public-key).

## Make a key [#make-a-key]

Run this in Terminal on macOS or Linux, or in PowerShell on Windows 10 and 11:

```bash title="On your computer"
ssh-keygen -t ed25519
```

Press Enter to keep the file where it suggests. A passphrase is optional: it protects the key if someone copies your files.

## Copy the public key [#copy-the-public-key]

Print it:

```bash title="On your computer"
cat ~/.ssh/id_ed25519.pub
```

Copy the whole line, from `ssh-ed25519` to the end. Paste it into **SSH public key** when you start a machine.

<Callout kind="warning">
  Never paste or share the file without `.pub`. That is your private key.
</Callout>

## Keys bFLOPS takes [#keys-bflops-takes]

* Types: `ssh-ed25519`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, and hardware keys (`sk-ssh-ed25519@openssh.com`, `sk-ecdsa-sha2-nistp256@openssh.com`).
* One key per machine, on one line, up to 4,096 characters.

## Use another key file [#use-another-key-file]

If your key is not the default one, point SSH at it with `-i`:

```bash title="On your computer"
ssh -i ~/.ssh/my_key -p 40022 root@203.0.113.7
```

## Next [#next]

[Connect to your machine](/docs/connect)
