Skip to content

LibSSH+SSHServer: Enough to run commands over the network#26684

Merged
nico merged 2 commits intoSerenityOS:masterfrom
LucasChollet:ssh-server-5
Mar 24, 2026
Merged

LibSSH+SSHServer: Enough to run commands over the network#26684
nico merged 2 commits intoSerenityOS:masterfrom
LucasChollet:ssh-server-5

Conversation

@LucasChollet
Copy link
Copy Markdown
Member

@LucasChollet LucasChollet commented Mar 24, 2026

You can see it in action inside Serenity here, and it also works on Lagom:

image (I changed the forwarding rules to get this screenshot)

OpenSSH clients send multiple CHANNEL_REQUEST packets at the same time, so in practice this depends on #26683.

This implementation allows any authentication from the current user
with the `none` method. It is a MAJOR SECURITY HOLE, use at your own
risk.

Other authentication methods should be added soon to solve this issue.
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Mar 24, 2026
This allows a client to execute commands on the server. This is very
minimal and don't support interactive sessions yet.

It is however enough to run simple commands like `uname` over the
network :^)
return Error::from_string_literal("Can't authenticate for another user account");

if (method_name == "none"sv.bytes()) {
// FIXME: Implement proper authentication!!!
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.

nit: Add dbgln("MAJOR SECURITY HOLE: Accepting without auth; add actual auth support soon"); maybe?

@nico nico merged commit 15edb02 into SerenityOS:master Mar 24, 2026
16 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Mar 24, 2026
@LucasChollet LucasChollet deleted the ssh-server-5 branch March 25, 2026 14:57
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.

4 participants