NEW Bare Metal Servers with 20G Dedicated Unmetered Bandwidth 20G Dedicated Unmetered Servers Read more STATUS

SSH Keys on Netrouting: Store Once, Use on Every Server and VM (Portal and API)

Sep 15, 2026 5 min read

Your SSH public keys are kept in one store on your account. Add a key once and it's offered everywhere a machine gets a system: a bare-metal reinstall, a cloud rebuild, or a live update to an instance that's already running. When a machine is installed with keys, root can log in with those keys and nothing else: password login over SSH is switched off.

Only the public half ever leaves your computer. If you haven't made a key pair yet, here's how:

ssh-keygen -t ed25519 -C "you@laptop"
cat ~/.ssh/id_ed25519.pub

The second command prints the line you'll paste, which starts with ssh-ed25519 (or ssh-rsa, ecdsa-).

Method 1: In the portal

Store a key

  1. Log in at amoni.app and pick SSH Keys from the left-hand menu.
  2. Under Add a key, give it a name you'll recognize later (work laptop, ci-runner) and paste in what's in the .pub file.
  3. Click Add key. The key shows up in the list with its fingerprint. Paste something that isn't an OpenSSH public key and the portal turns it down, telling you what a valid one starts with. A key you've already stored is refused too, and the message names it.
The SSH Keys page in the Amóni portal: one stored key named laptop with its SHA256 fingerprint, and an Add a key form with a name field and a public key field filled in
One list for the whole account, and every reinstall and rebuild picks from it.

Deleting a key here (the trash icon) only takes it off the list. Machines that already have it keep it until their next reinstall or rebuild. To get it off a running machine, edit ~/.ssh/authorized_keys on that machine, or use the live update below.

Use keys on a fresh system

  • Bare metal: on the server's Reinstall tab, tick the stored keys you want under SSH Keys, or paste in extra ones. Details: reinstall the operating system.
  • Cloud: in the Rebuild VM dialog, the keys are listed under SSH keys for the new system; tick the ones you want. See rebuild.

The server's own SSH Keys tab shows the same list read-only, so you can see what a reinstall is going to offer.

Apply keys to a running cloud instance

  1. Go to the instance and open its SSH Keys tab.
  2. Tick every key that should be on the machine. The button keeps count: Apply to VM (1).
  3. Click Apply to VM. That writes the selected set to the machine's provisioning drive, where it replaces whatever was applied that way before.
  4. From the instance header, do a Stop and then a Start. That's what regenerates the provisioning drive. A plain reboot doesn't, so the keys would never land.
The SSH Keys tab of a cloud instance in the Amóni portal: the stored key laptop ticked, an Apply to VM (1) button, a Use in rebuild button, and a note that keys take effect after a Stop and Start
Tick, apply, then stop and start.

Use in rebuild, on the same tab, opens the rebuild dialog with those keys already selected. Use it when you wanted a fresh system anyway.

Method 2: With the API

Changing the key store takes the SSH Keys scope (sshkeys.write), while listing it takes read. Applying keys to an instance needs vms.write. Reference: api.amoni.app/v1/docs.

Store a key

curl -s -X POST https://api.amoni.app/v1/ssh-keys \
  -H "Authorization: Bearer nr_live_..." \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"ci-runner\", \"public_key\": \"$(cat ~/.ssh/id_ed25519.pub)\"}"
{ "success": true, "data": { "id": 42, "fingerprint": "SHA256:Zt3v9Qk2mXpL7r4w...", "key_type": "ssh-ed25519" } }

List and delete

curl -s https://api.amoni.app/v1/ssh-keys -H "Authorization: Bearer nr_live_..."
{ "success": true, "data": [ { "id": 42, "name": "ci-runner", "public_key": "ssh-ed25519 AAAA...", "key": "ssh-ed25519 AAAA...",
    "fingerprint": "SHA256:...", "key_type": "ssh-ed25519", "created_at": "2026-09-15 10:12:00" } ] }

key is a copy of public_key. Both stay in the response so older clients keep working.

curl -s -X DELETE https://api.amoni.app/v1/ssh-keys/42 -H "Authorization: Bearer nr_live_..."

Use the ids everywhere else

Pass stored key ids as ssh_key_ids to POST /v1/servers/{id}/reinstall and POST /v1/vms/{accountId}/{vpsId}/rebuild. Raw keys, one per line, go in sshkeys, and you can send both in the same call.

Apply to a running instance

curl -s -X PUT https://api.amoni.app/v1/vms/990204/411/ssh-keys \
  -H "Authorization: Bearer nr_live_..." \
  -H "Content-Type: application/json" \
  -d '{"ssh_key_ids": [42]}'
{
  "success": true,
  "data": {
    "username": "root",
    "applied": [ { "name": "ci-runner", "fingerprint": "SHA256:..." } ],
    "pasted_key_count": 0,
    "message": "Keys saved to the machine's provisioning drive. ..."
  }
}

Then stop and start the instance (POST .../power with stop, then start) to regenerate the drive. Container-type instances don't have a provisioning drive, so for them the call answers 422 and keys land only at creation.

What the API will tell you

Status code Meaning
201 / 200 none Key stored / applied.
401 / 403 insufficient_scope Bad key, or missing sshkeys.write / vms.write.
404 none There's no such key id or instance on your account. Body: {"success": false, "error": "Not found"}.
422 invalid_key That isn't an OpenSSH public key. Paste the .pub contents.
422 duplicate_key You've stored that key already, and the error names it.
422 no_keys Apply was called with nothing selected or pasted.
500 none “The keys could not be applied to this VM. It may not support automated configuration. Contact support.”

Troubleshooting

  • “Permission denied (publickey)”. The machine has keys, just not the one you're offering. Check with ssh -v which key gets tried, then point at the right one with -i. If none of your keys is on the machine, you get back in with the password (on the console) or a reinstall with the right key.
  • I applied keys to a running instance and they do not work. Check that you did a stop and a start, because a reboot isn't enough. Also, the set you apply replaces the one applied before it.
  • The portal refuses my key. Paste the single line from the .pub file: not the private key, and not a PuTTY-format block. On PuTTY, export the OpenSSH public key from PuTTYgen (“Public key for pasting into OpenSSH authorized_keys file”).
  • I deleted a key but it still logs in. Deleting from the store never touches the machines themselves. Remove the line from ~/.ssh/authorized_keys on each one, or apply a new set to the instance.
  • Keys for a Windows server? Windows images don't use the key store. Log in with the password, over the console or RDP.

Still stuck?

Open a support ticket, select the machine, and include the fingerprint of the key you expect to work (ssh-keygen -lf ~/.ssh/id_ed25519.pub). Never send us the private key.

Built for production

Why teams stay with Netrouting

We connect you to the Internet using network engineers (and not order takers) and hardware and infrastructure that is built to last, so we can pick up where you left off when you need us.

  • Expert-Level Support Our staff is available 24 hours a day, 7 days a week to handle network administration and systems management issues as they occur.
  • Scalable Solutions Build whatever depth or breadth your infrastructure needs and then scale as required.
  • Enhanced Security Enable 2-factor authentication and also limit by IP address from the control panel to secure your account.
  • Cost-Efficient Infrastructure You will always receive the best value from your investment as you will be optimized for budget without any compromise on Quality.