Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent usage of SSH persistent connections #160

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fooker
Copy link
Contributor

@fooker fooker commented Jun 27, 2023

Deployment sometimes get stuck on "Pushed system closure" if SSH control master already exists for the connection to make.

This is more like a bug in the nix SSH implementation which is usually mitigated by setting these options in NIX_SSHOPTS.

Deployment sometimes get stuck on "Pushed system closure" if SSH control master already exists for the connection to make.

This is more like a bug in the nix SSH implementation which is usually mitigated by setting these options in `NIX_SSHOPTS`.
@frobware
Copy link

I too ran into 'Deployment sometimes get stuck on "Pushed system closure"' an awful lot and as a short-term measure simply removed persistent connections from my ssh config.

@dantefromhell
Copy link

I'm getting the issues too, but since many of my system use Security Key based pubkey auth the ControlMaster feature is super helpful for not pressing my Yubikey constantly.
Have the ControlMaster forcefully disabled would break my setup.

But I do run into the reported issue too. I have not tested/ tuned this, but from past experiences SSH default config is rather bad at detecting connections that got closed on the server side by a reboot.
Possibly tuning the KeepAlive SSH settings would solve the reported problem without needing to disable the ControlMaster?

@@ -345,6 +345,8 @@ impl Ssh {
"-o",
"BatchMode=yes",
"-T",
"-o", "ControlMaster=no",
"-o", "ControlPath=/var/empty/non-existant",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you bother setting ControlPath? If ControlMaster is no, ssh won't even look at ControlPath.

@NeverBehave
Copy link
Contributor

NeverBehave commented Oct 15, 2023

Is this related? I thought colmena haven't implement session reuse.

Ah nvm, it is nix ssh implementation details.

#6

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.

None yet

5 participants