Skip to content

enhancement: WithConnectTimeout/WithHostKeyChecking silently no-op for non-XCryptoDialer #68

@jonchun

Description

@jonchun

Summary

WithConnectTimeout, WithHostKeyChecking, and WithKnownHostsFile use a type assertion m.dialer.(*XCryptoDialer) and silently do nothing if it fails. Security-critical settings like WithHostKeyChecking(HostKeyStrict) are silently dropped with no warning when a custom dialer is provided.

Location

ssh/ssh.go:77-83, 93-99

Suggested Fix

Log a warning or return an error when the option cannot be applied to the current dialer type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: lowNice to fix - minor improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions