Documentation
¶
Overview ¶
Package vm is `openvicloud vm`: the VM lifecycle (lifecycle.go), and `vm ssh` with the tunnel it runs as ssh's ProxyCommand.
A VM has no public address: ssh reaches it through a websocket to the control plane, which runs nc to port 22 inside the guest (titan-ops features/vm/design.md#ssh-session). `vm ssh` starts the system ssh with that tunnel; the customer's key and known_hosts stay ssh's business.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SshArgs ¶
SshArgs are the arguments of the system ssh: the tunnel as ProxyCommand, and a host key alias per VM so known_hosts tells VMs apart although every one is reached the same way. The destination comes before extra: ssh still reads options after it, and the first word that is not an option starts the remote command.
func Tunnel ¶
func Tunnel(ctx context.Context, deps *command.Deps, vmId string, in io.Reader, out io.Writer) error
Tunnel copies in to the VM's port 22 and the VM's answer to out, until either side ends or ctx is done; then the websocket is closed normally, which ends the command in the guest at once.
Types ¶
This section is empty.