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

Preserve the SSH_AUTH_SOCK environment variable #368

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

imgrant
Copy link
Contributor

@imgrant imgrant commented Jan 25, 2022

Proposed Changes

Add --preserve-env=SSH_AUTH_SOCK to the sudo invocation that switches to root immediately upon login (from, e.g. hassio user)

N.b. it's fine to leave this in by default, since if allow_agent_forwarding is false, the agent won't work.

Related Issues

fixes #367 SSH agent configuration isn't preserved

@github-actions

This comment was marked as resolved.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Feb 25, 2022
@imgrant
Copy link
Contributor Author

imgrant commented Feb 25, 2022

This PR is really simple, I wonder if someone could review it? The linked issue, #367, is also languishing as unloved. ☹️

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Feb 26, 2022
ssh/rootfs/etc/cont-init.d/ssh.sh Outdated Show resolved Hide resolved
@imgrant imgrant force-pushed the preserve-ssh-agent-env branch from 677746b to 0c452db Compare March 19, 2022 22:45
@imgrant imgrant requested a review from frenck March 19, 2022 22:46
@frenck frenck added the enhancement Enhancement of the code, not introducing new features. label Mar 20, 2022
@frenck frenck changed the title fix: Preserve the SSH_AUTH_SOCK environment variable — fixes #367 Preserve the SSH_AUTH_SOCK environment variable Mar 20, 2022
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @imgrant 👍

@frenck frenck merged commit 65d80f3 into hassio-addons:main Mar 20, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement of the code, not introducing new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSH agent configuration isn't preserved
2 participants