Skip to content

Add cli option for passing a second key #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

alexhulbert
Copy link
Member

📝 Summary

  • Replace single --ssh-pubkey-file with --host-ssh-pubkey-file and --container-ssh-pubkey-file flags
  • Serve both pubkeys at /pubkey endpoint, separated by a newline
  • Container pubkey is optional

⛱ Motivation and Context

  • Now that the searcher provides their encryption password over an SSH to the CVM host (dropbear), we need to provide both keys to prevent an MITM attack
  • The searcher can just copy the text into known_hosts as before

✅ I have run these commands

  • make lint
  • make test
  • go mod tidy

@alexhulbert alexhulbert requested a review from Ruteri May 23, 2025 23:34
@alexhulbert alexhulbert self-assigned this May 23, 2025
@alexhulbert
Copy link
Member Author

The lint doesn't work in CI but it works fine on my laptop

Copy link
Collaborator

@Ruteri Ruteri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This server doesn't have to be specific to sandboxes — and the API actually is not still, simply returning a list of pubkeys.
However, the flags are extremely specific to sandboxes, I think needlessly so. Would it work to simply allow a list of files be passed?

@alexhulbert alexhulbert closed this Jun 4, 2025
@alexhulbert alexhulbert mentioned this pull request Jun 4, 2025
3 tasks
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