ssh

package
v0.0.0-...-6e635d1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAndSignKey

func GenerateAndSignKey(client *api.Client, orgID string, resourceID string) (privPEM, pubKey, cert string, signData *api.SignSSHKeyData, err error)

GenerateAndSignKey generates an Ed25519 key pair and signs the public key via the API.

func RunExec

func RunExec(opts RunOpts) (int, error)

RunExec runs an interactive SSH session by executing the system ssh binary (with a PTY when stdin is a terminal on Unix). Requires ssh to be installed. opts.PrivateKeyPEM and opts.Certificate must be set (JIT key + signed cert).

func RunNative

func RunNative(opts RunOpts) (int, error)

RunNative runs an interactive SSH session using the pure-Go client (golang.org/x/crypto/ssh). It does not use the system ssh binary. opts.PrivateKeyPEM and opts.Certificate must be set (JIT key + signed cert).

func SSHCmd

func SSHCmd() *cobra.Command

func SignCmd

func SignCmd() *cobra.Command

Types

type RunOpts

type RunOpts struct {
	User          string
	Hostname      string
	Port          int
	PrivateKeyPEM string
	Certificate   string
	SSHPassthrough
}

type SSHPassthrough

type SSHPassthrough struct {
	Options       []string
	RemoteCommand []string
}

func ParseOpenSSHPassThrough

func ParseOpenSSHPassThrough(args []string) SSHPassthrough

ParseOpenSSHPassThrough walks pass-through args (e.g. args[1:] from "pangolin ssh <res> ...").

Jump to

Keyboard shortcuts

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