dagger/dagger · error

volume known hosts missing

Error message

volume known hosts missing

What it means

An SSHFS engine volume was configured with host key checking enabled (insecureSkipHostKeyCheck unset) and a known-hosts secret present, but the secret decrypted to empty content. sshfs would then have no hosts to trust, so the mount is refused: either supply known_hosts data or explicitly enable insecure skip.

Source

Thrown at core/volume_mount.go:227

}

func mountSSHFSVolume(ctx context.Context, readonly bool, cfg *SSHFSVolumeConfig) (_ []ctrdmount.Mount, _ func() error, rerr error) {
	privateKey, err := plaintextSecret(ctx, cfg.PrivateKey, "volume private key")
	if err != nil {
		return nil, nil, err
	}

	var knownHosts []byte
	if cfg.KnownHosts.Self() != nil {
		knownHosts, err = plaintextSecret(ctx, cfg.KnownHosts, "volume known hosts")
		if err != nil {
			return nil, nil, err
		}
		if len(knownHosts) == 0 && !cfg.InsecureSkipHostKeyCheck {
			return nil, nil, fmt.Errorf("volume known hosts empty")
		}
	} else if !cfg.InsecureSkipHostKeyCheck {
		return nil, nil, fmt.Errorf("volume known hosts missing")
	}

	source, port, releaseService, err := sshfsMountSource(ctx, cfg)
	if err != nil {
		return nil, nil, err
	}
	release := releaseService
	defer func() {
		if rerr != nil && release != nil {
			_ = runSSHFSVolumeCleanup(ctx, release)
		}
	}()

	workDir, err := os.MkdirTemp("", "dagger-sshfs-")
	if err != nil {
		return nil, nil, fmt.Errorf("create sshfs workdir: %w", err)
	}
	release = joinCleanup(func() error {

View on GitHub (pinned to 82ba2681db)

Solutions

  1. Supply a KnownHosts secret containing the host's public key
  2. Set insecureSkipHostKeyCheck: true if host verification is intentionally skipped
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/volume_mount.go:227 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05). Data as JSON: /api/errors/fd7ec598e2dd53fe. Report an issue: GitHub.