ssh

package
v0.1.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package ssh provides SSH authentication helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMethods

func AuthMethods(auth config.Auth) ([]gossh.AuthMethod, io.Closer, error)

AuthMethods builds the list of SSH auth methods for a host config. The returned io.Closer must be closed when the SSH connection is done to release any resources (e.g. the SSH agent socket). It may be nil.

func HostKeyCallback

func HostKeyCallback() (gossh.HostKeyCallback, error)

HostKeyCallback returns a callback that verifies remote host keys against ~/.ssh/known_hosts (TOFU — Trust On First Use):

  • Known host, key matches → allowed
  • Unknown host → key is added to known_hosts, allowed
  • Known host, key changed → rejected with a clear error message

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL