Skip to content

SSH ProxyJump breaks hostname resolution in commit e6c7d47 #306

Description

@vadvolo

Summary

Commit e6c7d47 "Use host from ssh config if provided only (#303)" breaks SSH ProxyJump functionality by causing hostname to become empty during tunnel connection.

Expected Behavior

SSH connections through ProxyJump should work with hostname properly resolved from NetHub/NetBox device inventory.

Actual Behavior

After commit e6c7d47, hostname becomes empty in SSH tunnel connections, causing connection failures.

Error before fix (working, commit 55c72c1):
dial tcp 10.44.33.5:22: i/o timeout

Error after breaking change (commit e6c7d47):
failed to open tunnel for any of given hosts: [:22], last error: ssh: rejected: connect failed (Name or service not known)

Notice the empty hostname: [:22] instead of [10.44.33.5:22]

Proposed Fix

The issue is in pkg/server/devuath.go line 35, where connectHost is initialized as empty string instead of using the original host:

Current (broken):
connectHost := ""

Proposed fix:
connectHost := host

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions