Skip to content

Add the SSH key under a free name when the name is taken (fixes HTTP 409) - #64

Merged
kchandan merged 1 commit into
mainfrom
key-name-taken
Nov 27, 2026
Merged

kchandan merged 1 commit into
mainfrom
key-name-taken

Conversation

@kchandan

Copy link
Copy Markdown
Member

Seen on a second laptop: ssh-key-add --cloud all failed on Shadeform with HTTP 409: There is already an SSH Key with name [labagent]. The account held a different key under that name, so ours was never added and the launch could not find it by fingerprint.

add_ssh_key (Shadeform and Lambda) now checks the account's key names first and, if the name is taken by another key, adds ours as labagent-<first 8 characters of the fingerprint>. A key already in the account is still found by fingerprint before anything is added, so reruns add nothing twice. Launches use the fingerprint, so the name does not matter to them.

Verified: new test with a fake Shadeform (stale labagent key, ours added under a new name, second call adds nothing); full suite passes except the known Nebius-login test. Not verified against the real Shadeform API, and Nebius and RunPod key names were not touched (not checked whether they hit the same conflict).

Created by LabAgent

… the name

A Shadeform or Lambda account that already had a different key called "labagent" answered HTTP 409, ssh-key-add failed, and a launch then could not find our key by its fingerprint. The key is now added as labagent-<fingerprint start> when the name is taken. A key already there is still found by fingerprint first and never added twice.

Created by LabAgent
https://becloudready.com/

Co-Authored-By: LabAgent <info@becloudready.com>
@kchandan
kchandan merged commit 64b0f5b into main Nov 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant