ssh

package
v1.3.0-main Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHCryptoSettings

type SSHCryptoSettings struct {
	KeyExchanges      []string
	Ciphers           []string
	MACs              []string
	HostKeyAlgorithms []string
}

SSHCryptoSettings contains the SSH crypto algorithm configuration

func GetSSHCryptoSettings

func GetSSHCryptoSettings(cfg *config.Config) SSHCryptoSettings

GetSSHCryptoSettings returns SSH crypto algorithm configuration based on FIPS mode detection and configuration overrides.

The algorithm selection follows this precedence:

  1. Explicit SSH configuration in cfg.CryptoPolicy.SSH (if provided)
  2. FIPS-compliant algorithms if FIPS mode is detected or forced
  3. Empty (golang.org/x/crypto/ssh will use defaults)

This ensures that SSH connections use FIPS-approved algorithms when required while maintaining backward compatibility in non-FIPS environments.

func (*SSHCryptoSettings) ApplyCryptoSettingsToClientConfig

func (s *SSHCryptoSettings) ApplyCryptoSettingsToClientConfig(cfg *ssh.ClientConfig)

ApplyCryptoSettingsToClientConfig applies crypto settings to an ssh.ClientConfig

Jump to

Keyboard shortcuts

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