Skip to content
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

recipes-core/dropbear: add custom dropbear config to enable ssh with rsa keys #102

Merged
merged 7 commits into from
Sep 12, 2023

Conversation

vegano1
Copy link
Collaborator

@vegano1 vegano1 commented Sep 12, 2023

Overview

For development, we have kept SSH RSA keys disabled, which means you can SSH to the Flex without using a password or private key. Since we are getting ready to ship the Flex we need to at least make it so you can't ssh as root without providing a valid private ssh key. This PR changes the config we provide to dropbear which disabled root logins with passwords, so the only way to be able to SSH into the Flex is with a valid private key for which the Flex has a matching public key.

Test Plan

  • Using the new /server/ssh_keys/from_local endpoint add a valid SSH public key to the Flex and make sure you can SSH using the matching private key
  • Make sure you CAN'T SSH to a Flex if you don't provide a valid SSH private key.
  • Make sure development builds still don't require an SSH private key
  • Make sure the public key matches the private key (provided privately)

Changes

  • Added a custom Dropbear config file that sets DROPBEAR_EXTRA_ARGS="-s" to enable SSH rsa logins ONLY
  • Custom Dropbear config is enabled only for release builds, so development still doesn't require ssh keys
  • Added default Opentrons SSH public key

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks good to me if it works!

@vegano1 vegano1 changed the title recipes-core/dropbear: add custom dropbear config to enable ssh with ssh rsa keys recipes-core/dropbear: add custom dropbear config to enable ssh with rsa keys Sep 12, 2023
@vegano1 vegano1 merged commit 1b1bb3d into main Sep 12, 2023
4 checks passed
@vegano1 vegano1 deleted the RCORE-807_add-ssh-auth branch September 12, 2023 18:24
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