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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI += "file://opentrons-dropbear.default"

do_install_append() {
# create a symlink to store rsa host keys in read-write /var/lib/dropbear dir.
install -d ${D}/var/lib/dropbear
rm -rf ${D}/${sysconfdir}/dropbear
ln -sf /var/lib/dropbear ${D}/${sysconfdir}/dropbear

# install dropbear config if release
if [[ "${OT_BUILD_TYPE}" =~ "release" ]]; then
bbnote "Installing custom dropbear config for release build."
install -m 0644 ${WORKDIR}/opentrons-dropbear.default ${D}${sysconfdir}/default/dropbear
fi
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Disable SSH password logins. We only use public key authentication.
# This prevents a confusing password prompt from showing up when someone
# tries to log in with a missing or wrong key.
DROPBEAR_EXTRA_ARGS="-s"
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ IMAGE_INSTALL += " \
opentrons-jupyter-notebook opentrons-usb-bridge \
opentrons-system-server opentrons-mcu-firmware \
opentrons-user-environment opentrons-module-firmware \
opentrons-systemd-units \
opentrons-systemd-units opentrons-ssh-keys \
"

# We do NOT want the toradex libusbgx packages that autoconfigure the OTG USB
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmd34g9YqwQ7oMOJjPJezLIAOsov9vtr/dWqrwsVPLX1MkM0zFJg1Ou9NE9p30VaDnE92Hx0N9ndr8mznoImx/l8lkm9Z2QW+uO1eSKoQVwlz/1Dc+MJq8gy41GWYlKLr7p2b0TicAPcvGGYsFOmEUszOr5M78kOa2SHcHryd5Ol0T1bZQJ9p66JM8yY0upclrZouJEI5ozq/fHcihuR/WVo/dq81lM3lImfnfTe48exV42CGMndfTM0LFwRSRN1ANNr+Wto1a+X4lRnlk/RFzxB8a49UxNqQTCpdy/49wilQV7FJu9oHsaJI1dcKV9DE657gOrzM7tBaJXL6yh8Jn

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DESCRIPTION = "Install authorized SSH keys to the image"
LICENSE="Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

SRC_URI = "file://opentrons-flex.pub"

do_install () {
install -m 700 -d ${D}/home/root/.ssh
install -m 644 ${WORKDIR}/opentrons-flex.pub ${D}/home/root/.ssh/authorized_keys
}

FILES_${PN} += "/home/root/.ssh/authorized_keys"
8 changes: 0 additions & 8 deletions linux-toradex_5.4-2.3.x.patch

This file was deleted.

Loading