Documentation
¶
Overview ¶
Package sshhostkeys verifies the SSH host keys of Prism instances (#739).
Every ssh invocation used to pass StrictHostKeyChecking=no and UserKnownHostsFile=/dev/null, so a host key was never checked or remembered: anyone in the network path, or holding a recycled public IP, could impersonate an instance and receive Jupyter tokens, template scripts, files and port forwards.
Keys are recorded on first use (StrictHostKeyChecking=accept-new) and checked on every later connection, in a Prism-owned known_hosts file. They are keyed by instance ID through HostKeyAlias, not by IP: EC2 reuses public IPs, so an IP-keyed entry would falsely reject the next instance that gets the address, while an ID-keyed entry belongs to exactly one instance for its whole life.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Forget ¶
Forget removes the recorded host key of an instance, e.g. when it is terminated. A missing file or entry is not an error.
func KnownHostsPath ¶
func KnownHostsPath() string
KnownHostsPath is Prism's ssh known_hosts file, beside the daemon state (PRISM_STATE_DIR, else ~/.prism).
Types ¶
This section is empty.