Skip to content

ssh: Add support for ServerAliveInterval #1336

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

Merged
merged 1 commit into from
Apr 16, 2025
Merged

Conversation

chipot
Copy link
Contributor

@chipot chipot commented Apr 11, 2025

I have some tasks running in pyinfra that are particularly long. This is within my expectations, but the problem is that paramiko raises EOFError for all the other hosts that are waiting their turn to run the next step.

After looking a bit I realize paramiko doesn't support SeverAliveInterval from ssh/config, but has a call transport.set_keepalive doing the same thing.

This PR adds the parsing for ServerAliveInterval from ssh/config and sets appropriately the keepalive on the transport.

Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

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

Nice find @chipot, this is great!

@Fizzadar Fizzadar merged commit f280df4 into pyinfra-dev:3.x Apr 16, 2025
59 checks passed
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