Skip to content

Add ability to execute ssh command#149

Open
llewelld wants to merge 2 commits intoisambard-sc:masterfrom
llewelld:048-add-auto-ssh
Open

Add ability to execute ssh command#149
llewelld wants to merge 2 commits intoisambard-sc:masterfrom
llewelld:048-add-auto-ssh

Conversation

@llewelld
Copy link
Copy Markdown
Contributor

@llewelld llewelld commented Nov 21, 2025

Adds the ability to spawn the ssh command generated using the ssh-command command.

Contributes to #48.

@llewelld
Copy link
Copy Markdown
Contributor Author

Currently the command doesn't work for me, so I'd like to get to the bottom of that before removing this from draft.

@milliams
Copy link
Copy Markdown
Collaborator

The ssh-command option has always been a bit janky as I think there's some subtle differences between SSH when running from a config file or from command-line args (this is why I've made it a hidden command in recent versions). One thought I did have was to write the config file to a temporary location and call ssh -F /tmp/clifton_config or similar.

@llewelld llewelld force-pushed the 048-add-auto-ssh branch 2 times, most recently from dff745d to ba8baf8 Compare November 22, 2025 19:09
@llewelld
Copy link
Copy Markdown
Contributor Author

llewelld commented Nov 22, 2025

Thanks for the explanation; I had wondered why the command was hidden!

I'm more than a little hazy on this, but it looks like the identity and certificate parameters aren't being propagated to the jump host, causing the connection to be rejected.

Switching out -J (ProxyJump) for a ProxyCommand seems to be a work around, so this version now connects for me, although I can see the certificate parsing to generate the config file is a lot more complex that what I have for the ssh connection, so that could be a fluke.

Tested on Linux/OpenSSH_8.9p1 and macOS/OpenSSH_9.9p2.

@llewelld llewelld marked this pull request as ready for review November 22, 2025 19:27
@llewelld
Copy link
Copy Markdown
Contributor Author

Thanks for re-running the CI on this. I'm a bit confused as to why it's failing just for aarch64; I'll look into it and see if I can figure it out.

@milliams
Copy link
Copy Markdown
Collaborator

Thanks for re-running the CI on this. I'm a bit confused as to why it's failing just for aarch64; I'll look into it and see if I can figure it out.

I don't think it's anything to do with what you've done. It's failing to install a dependency on just one architecture. I think I've seen it before with that dependency and I might have fixed it with an update of the version.

@llewelld llewelld marked this pull request as draft November 28, 2025 08:31
@llewelld
Copy link
Copy Markdown
Contributor Author

llewelld commented Nov 28, 2025

Thanks for the pointers @milliams and for re-running the CI again. I'm switching it to draft while I figure out how to reproduce this myself.

Adds the ability to spawn the ssh command generated using the
ssh-command command.
@llewelld
Copy link
Copy Markdown
Contributor Author

I'm afraid I'm confused by this. When I run ostensibly the same workflow on my fork of the repository it goes through okay: https://github.com/llewelld/clifton/actions/runs/19760556074

The only difference is that I gave it an annotated tag to avoid an error parsing the version returned by git describe and added a switch to allow manual triggering of the workflow. I can't see that either of these could be affecting dependency resolution 😕

@milliams
Copy link
Copy Markdown
Collaborator

That's dragging up a memory about the GitHub Actions package cache being the problem. I'll see if I can clear it and if it makes a difference.

@llewelld
Copy link
Copy Markdown
Contributor Author

Hooray! 🙌 Thank you. I'll drop it out of draft and appreciate your thoughts on whether this is a viable approach.

@llewelld llewelld marked this pull request as ready for review November 28, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants