Skip to content

How to upload an SSH public key

What is an SSH public key?

SSH uses a key pair: a private key that stays on your computer and a public key that you can share. The public key goes on your server. When you connect, your computer proves it owns the matching private key, and the server lets you in.

You can get a key in two ways in the SSH Access tab:

  • Create a key for me (recommended): we generate a brand-new key and download it to your computer as a .pem file. No commands needed. We do not keep a copy of the private key, so save the file when it is offered: it is your only chance.
  • Already have an SSH key? Paste it here instead: you paste only your public key. Your private key never leaves your computer and we never see it.

Warning

Never paste your private key anywhere: the dashboard, a support ticket or a chat. Only paste public keys (lines that start with ssh-ed25519, ssh-rsa or ecdsa-sha2-).

Create a key for me

1

Click Create a key for me (recommended)

In the SSH Access tab, click the button. You can give the key an optional name, then click Create Key.
2

Download the key file

When you see Your key is ready, click Download key file and keep the file somewhere safe. Then click Done.
3

Connect with the file

On Mac or Linux, run chmod 600 oneclickclaw-*.pem once, then ssh -i oneclickclaw-*.pem user@ip with the username and server IP from your connection details. On Windows you can use PuTTY or WinSCP. The tab's How do I use the key file to connect? section shows these steps with your own details filled in.

Generate a key on Mac or Linux

If you prefer to make your own key, open a terminal on your computer and run:

ssh-keygen -t ed25519 -C "oneclickclaw-my-server"

Press Enter to accept the default file location. Choose a strong passphrase, or leave it empty if you understand the security implications. Two files are created in ~/.ssh/: id_ed25519 (private, never share) and id_ed25519.pub (public, this is what you paste).

To copy the public key contents:

cat ~/.ssh/id_ed25519.pub

Generate a key on Windows

Open PowerShell (or Windows Terminal) and run the same ssh-keygen command shown above. OpenSSH ships with Windows 10 and Windows 11 by default. Files end up in %USERPROFILE%\.ssh\. To copy the public key contents:

type $env:USERPROFILE\.ssh\id_ed25519.pub

Upload it from the dashboard

1

Open the SSH Access tab

In the dashboard, open your server, then click the SSH Access tab. You must have already enabled SSH access on this server, see How to enable SSH access.
2

Open the paste form

Click Already have an SSH key? Paste it here instead. A form appears with two fields: Public key and Label (optional).
3

Fill in the form

Paste the entire contents of your .pub file into the public key field. ed25519, rsa and ecdsa public keys are supported. Give the key a label if you like (for example work-mac); left blank, it is named Key 1, Key 2 and so on. Then click Add Key.

Verify it works

Your connection details in the SSH Access tab show the exact command for your server, looking like this:

ssh occcust_1428@198.51.100.42

Copy that command into your terminal (add -i and the file name if you use a key file we created for you). The first time, your terminal will ask if the server fingerprint is correct. Type yes and press Enter. You should land in a shell prompt on your server. If you do not, see Server troubleshooting.