Skip to content

Comments

Handle ssh-agent-filter reconnection for hangups on upstream#1

Open
carbidemouse wants to merge 1 commit intojnoxon:mainfrom
carbidemouse:reconnect-upstream
Open

Handle ssh-agent-filter reconnection for hangups on upstream#1
carbidemouse wants to merge 1 commit intojnoxon:mainfrom
carbidemouse:reconnect-upstream

Conversation

@carbidemouse
Copy link

@carbidemouse carbidemouse commented Aug 28, 2025

Adds ssh-agent-filter automatic reconnection functionality to handle upstream SSH agent connection failures. Instead of using periodic keepalive pings, the system automatically detects connection failures and reconnects when needed.

  • No unnecessary overhead - No periodic pings when connection is healthy
  • On-demand reconnection - Only reconnects when actually needed
  • Minimal resource usage - No background goroutines or timers
  • Immediate response - Detects and handles failures as they occur
  • Comprehensive error handling - Covers various failure scenarios

@jnoxon
Copy link
Owner

jnoxon commented Aug 28, 2025

Thanks for the contribution.

I didn't realize when I built this software that I could solve my problem in a different way. As such, I haven't used this software in quite some time. I'm curious if you were also unaware:

In .ssh/config, you can specify the key you want to use for a given connection. E.g.,

Host github.com
        IdentityFile ~/.ssh/github-id.pub

This doesn't require the private key to exist anywhere on the machine, just the public key. It just forces it to select the right key from the keys presented by the agent.

I'm curious if this solves your problem as well, and if not, I'd like to hear more about your use case.

@carbidemouse
Copy link
Author

Hi @jnoxon thank you for the quick feedback.

I am aware of the preferred key configuration, however this utility still solves a particular use-case for me. When forwarding the agent to a remote machine, I want to present an exact subset of keys. I had been building this on macOS for quite some time, and it recently became untenable due to some dependency incompatibilities on macOS.

I'd be happy to take ownership of the repository if you are no longer maintaining it.

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