Skip to content

ssh add --init flag#26

Merged
coffinsfcompute merged 1 commit into
mainfrom
coffin/ssh_magic_setup
Sep 26, 2024
Merged

ssh add --init flag#26
coffinsfcompute merged 1 commit into
mainfrom
coffin/ssh_magic_setup

Conversation

@coffinsfcompute
Copy link
Copy Markdown
Contributor

@coffinsfcompute coffinsfcompute commented Sep 23, 2024

This is an alternative setup path to using --add so that a customer can just run:

sf ssh --init
sf ssh node-01

and it should just always work. I hope that the backend deduplicates ssh public keys as otherwise I can easily see customers running --init more than once and having the backend receive another request to add it.

I was slightly unsure about the expected handling of errors in terms of what should be logged, thrown, etc. but I have tested this code somewhat thoroughly manually and it seems to work properly from everything that I can observe. I probably made it more robust than necessary, but also I really don't want to debug weird edge cases of this command failing while a customer is stressed and unable to ssh into their machines. I was wondering if should update the Warning: failed finding default ssh keys (checking hardcoded list) to request them to email us? It would almost certainly indicate a bug.

@coffinsfcompute coffinsfcompute changed the title ssh add --magic-setup flag ssh add --init flag Sep 25, 2024
@coffinsfcompute coffinsfcompute merged commit 7a24154 into main Sep 26, 2024
@coffinsfcompute coffinsfcompute deleted the coffin/ssh_magic_setup branch October 4, 2024 22:35
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.

2 participants