Skip to content

Commit

Permalink
Add inlined SSH host key example
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaguire committed May 1, 2024
1 parent 21ae1e4 commit d3ee36c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/config/sshd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,28 @@ allowed for your safety.

## sshd.host_key

`host_key` points to a file containing the ssh host private key to use for the ssh server side of the console.
`host_key` points to a file containing the ssh host private key to use for the ssh server side of the console. In the
above example, `/path/to/ssh_host_ed25519_key` contains a PEM-encoded SSH host key. The following example shows a host
key inlined as a YAML multiline string.

```
sshd:
host_key: |
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACCAvcPQI9IPXWXmsCFBi+IGoqxjKcCZjivS2ev7wVLWjAAAAKCzhBSYs4QU
mAAAAAtzc2gtZWQyNTUxOQAAACCAvcPQI9IPXWXmsCFBi+IGoqxjKcCZjivS2ev7wVLWjA
AAAECkLDZ1uXRNpvWTG+tff7MSoy6WCDkNhlwB+I5BpI0zfYC9w9Aj0g9dZeawIUGL4gai
rGMpwJmOK9LZ6/vBUtaMAAAAGmptYWd1aXJlQGpvaG5zLW1icC0zLmxvY2FsAQID
-----END OPENSSH PRIVATE KEY-----
```
:::warning
Do not use the above private key in your own config file. SSH host keys should be unique per host, and provide
authenticity that you are connecting to the correct server.
:::
You can generate a host key using the `ssh-keygen` command line utility.
Expand Down

0 comments on commit d3ee36c

Please sign in to comment.