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

Feat: Better SSH Socket Support via ssh-agent (Linux Host) #764

Closed
wants to merge 4 commits into from

Conversation

drmikecrowe
Copy link

@drmikecrowe drmikecrowe commented Jan 30, 2022

what

This fixes firing up ssh-agent properly by testing two conditions:

  • First, attempt to list added keys using ssh-add -l &>/dev/null. If this returns an error of 2, we can't communicate with the agent
  • Next, load the environment (if it exists) and repeat the above test.
    If these fail, then restart the ssh-agent

Additionally, only map SSH_AUTH_SOCK from a real folder. /tmp will not properly map into docker and results in being unable to access the socket.

Finally, if on Linux and using SSH_AUTH_SOCK and you are not running as root (an upcoming PR), you have to map the host socket using socat to access the host folder as root.

why

  • ssh-agent functionality is not robust enough (see above)

@drmikecrowe drmikecrowe requested a review from a team as a code owner January 30, 2022 04:40
@korenyoni korenyoni changed the title Better SSH socket support via ssh-agent Feat: Better SSH socket support via ssh-agent (Linux) Jan 30, 2022
@korenyoni korenyoni changed the title Feat: Better SSH socket support via ssh-agent (Linux) Feat: Better SSH Socket Support via ssh-agent (Linux) Jan 30, 2022
@korenyoni korenyoni added the enhancement New feature or request label Jan 30, 2022
@korenyoni korenyoni requested a review from Nuru January 30, 2022 14:34
@korenyoni
Copy link
Member

Deferring to @Nuru because this affects high-level Geodesic wrapper functionality.

@korenyoni korenyoni changed the title Feat: Better SSH Socket Support via ssh-agent (Linux) Feat: Better SSH Socket Support via ssh-agent (Linux Host) Jan 30, 2022
@drmikecrowe
Copy link
Author

@korenyoni -- I'm going to close this one as it's related to #594 and how that fix will impact the SSH socket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants