Skip to content

Enabling Dropbear SSH and SCP#168

Merged
ioeddk merged 16 commits intomainfrom
yingqi/sshd
Feb 23, 2026
Merged

Enabling Dropbear SSH and SCP#168
ioeddk merged 16 commits intomainfrom
yingqi/sshd

Conversation

@ioeddk
Copy link
Copy Markdown
Contributor

@ioeddk ioeddk commented Feb 18, 2026

Enabled SSH into the Asterinas kernel and SCP command. The Makefile configures a run_dropbear target to start the kernel with the dropbear server automatically started. Also, test/Makefile copies the compiled dropbear programs into the initramfs and generates the host keys,

Comment thread test/service/start.sh Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we are ready to have a general start.sh file. The name kinda implies it is always run and that's not how we are setting things up yet. Just having start_dropbear.sh seems like a good bet for now. We can setup universal services that already run in the asterinas environment later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 44b55d6

@ioeddk ioeddk marked this pull request as ready for review February 20, 2026 03:12
@ioeddk ioeddk requested a review from a team as a code owner February 20, 2026 03:12
Copy link
Copy Markdown
Contributor

@arthurp arthurp left a comment

Choose a reason for hiding this comment

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

It looks like you have some handling for old Docker containers which don't have dropbear. I'm OK with that. But if there are cases where dropbear might just be missing for other reasons we should figure out why.

Could you add documentation in the readme and maybe other appropriate places? Just a couple of sentences and an example to show what it can do and how to use it.

echo "Dropbear started (PID $!)."
lsof -p $!
else
echo "WARNING: dropbear not found, should not use run_dropbear!!!"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why would this ever happen? Is this just to catch the case where we are using an old version of the docker image?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is to prevent you from running make run_dropbear but dropbear is not built in the environment. You're right, in the case we are using the old version of the Docker image, or it is somehow missing.

Copy link
Copy Markdown
Contributor Author

@ioeddk ioeddk Feb 20, 2026

Choose a reason for hiding this comment

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

The current Docker image is not updated to include the dropbear binaries, so copying the program in Makefile would fail all the CI/CD tests in the pipeline if we always try to copy it. Adding the check for existence before copying the binaries would make it pass the CI/CD, unless the Docker image is updated before this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK. I'm unsure of how best to handle Dockerfile updates (see #34). But, merging this PR in this "non-working" state (dropbear not enabled yet) and then following with a separate PR to update the docker container seems OK.

Comment thread test/service/start_dropbear.sh
@ioeddk
Copy link
Copy Markdown
Contributor Author

ioeddk commented Feb 20, 2026

Documentation added, see 5221132.

Copy link
Copy Markdown
Contributor

@arthurp arthurp left a comment

Choose a reason for hiding this comment

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

  • check on the -i thing and remove it if possible.
  • start creating a PR to update the docker container.

Otherwise, LGTM. Go ahead and merge when it's ready (you don't have to wait for the container update PR).

Comment thread README.md Outdated
Comment thread test/service/start_dropbear.sh
echo "Dropbear started (PID $!)."
lsof -p $!
else
echo "WARNING: dropbear not found, should not use run_dropbear!!!"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK. I'm unsure of how best to handle Dockerfile updates (see #34). But, merging this PR in this "non-working" state (dropbear not enabled yet) and then following with a separate PR to update the docker container seems OK.

@ioeddk ioeddk merged commit 5435f2e into main Feb 23, 2026
19 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.

2 participants