Skip to content

Commit 874303d

Browse files
committed
Documentation: Add a document to explain how to connect to SSHServer
1 parent 74d7ecf commit 874303d

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Documentation/SSHServer.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Connecting to Serenity's SSH Server
2+
3+
Serenity's SSH server currently supports only a subset of standard SSH features.
4+
5+
## Authentication
6+
7+
The server only supports the `publickey` authentication method.
8+
9+
- Your **client** must have a private key.
10+
- The **server** must have access to the corresponding public key.
11+
12+
> NOTE: Only **ED25519** keys are supported. Other key types (RSA, ECDSA, etc.) will not work.
13+
14+
### Generating a Key Pair
15+
16+
To generate a compatible key pair, run the following command on your host machine:
17+
18+
```bash
19+
ssh-keygen -t ed25519 -f ~/.ssh/serenity_ed25519
20+
```
21+
22+
### Installing the public key in SerenityOS
23+
24+
To allow SSH access, you need to install your public key into the SerenityOS image so the SSH server can authenticate your client.
25+
26+
The SSH server looks for authorized keys in `/home/anon/.config/ssh/authorized_keys`.
27+
The simplest way to do it is to add these lines to `sync-local.sh`:
28+
29+
```bash
30+
mkdir -p mnt/home/anon/.config/ssh/
31+
cat path/to/serenity_ed25519.pub >> mnt/home/anon/.config/ssh/authorized_keys
32+
```

0 commit comments

Comments
 (0)