Skip to content

ssh: add the ssh:// scheme in golangConnectionDial - #1020

Open
larrasket wants to merge 1 commit into
podman-container-tools:mainfrom
larrasket:fix-46-ssh-dial-scheme
Open

ssh: add the ssh:// scheme in golangConnectionDial#1020
larrasket wants to merge 1 commit into
podman-container-tools:mainfrom
larrasket:fix-46-ssh-dial-scheme

Conversation

@larrasket

Copy link
Copy Markdown

golangConnectionDial passed the bare host to Validate, which parses it with url.Parse and needs an ssh:// scheme. Without it the parsed host is empty and the dial target becomes ":22", so remote connections fail with "dial tcp :22: connect: connection refused".

golangConnectionExec and golangConnectionScp already prefix ssh://.

Move that idiom into a small helper and use it in all three, so the dial path is fixed and the normalization lives in one place.

Fixes #46

golangConnectionDial passed the bare host to Validate, which parses it
with url.Parse and needs an ssh:// scheme. Without it the parsed host is
empty and the dial target becomes ":22", so remote connections fail with
"dial tcp :22: connect: connection refused".

golangConnectionExec and golangConnectionScp already prefix ssh://.
Move that idiom into a small helper and use it in all three, so the dial
path is fixed and the normalization lives in one place.

Fixes podman-container-tools#46

Signed-off-by: Saleh <root@lr0.org>
@github-actions github-actions Bot added the common Related to "common" package label Jul 24, 2026
@packit-as-a-service

Copy link
Copy Markdown

Packit jobs failed. @containers/packit-build please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid usage of Validate function in ssh.golangConnectionDial is causing connection issues to remote podman

1 participant