ssh

package
v1.1.0-rc4 Latest Latest
Warning

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

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

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