https://github.com/flashbots/ssh-pubkey-server
Serves the local ssh server pubkey for attestation through a proxy
https://github.com/flashbots/ssh-pubkey-server
Last synced: 11 months ago
JSON representation
Serves the local ssh server pubkey for attestation through a proxy
- Host: GitHub
- URL: https://github.com/flashbots/ssh-pubkey-server
- Owner: flashbots
- License: mit
- Created: 2024-08-05T13:35:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T12:49:57.000Z (over 1 year ago)
- Last Synced: 2025-02-25T15:16:46.562Z (over 1 year ago)
- Language: Go
- Size: 22.5 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ssh-pubkey-server
[](https://goreportcard.com/report/github.com/flashbots/go-template)
[](https://github.com/flashbots/go-template/actions?query=workflow%3A%22Checks%22)
---
## Getting started
**Run CLI**
The following will request server ssh pubkey through a proxy, and separately run ssh-keyscan and will return the matching server keys that you can then append to your known_hosts.
```bash
./cmd/cli/add_to_known_hosts.sh >> ~/.ssh/known_hosts
```
**Build HTTP server**
```bash
make build-httpserver
```
**Run pubkey server**
```bash
go run ./cmd/httpserver/main.go [--listen-addr=127.0.0.1:8080] [--ssh-pubkey-file=/etc/ssh/ssh_host_ed25519_key.pub] [--ssh-pubkey-file=/path/to/container_key.pub]
```
You can specify multiple `--ssh-pubkey-file` flags to serve multiple public keys. The server will serve all pubkeys at the `/pubkey` endpoint, separated by newlines.
**Install dev dependencies**
```bash
go install mvdan.cc/gofumpt@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install github.com/daixiang0/gci@latest
```
**Lint, test, format**
```bash
make lint
make test
make fmt
```