Any geodesic users who ssh and use ssh-agent? I...
# geodesic
m
Any geodesic users who ssh and use ssh-agent? I believe the current
/etc/profile.d/ssh-agent.sh
is a bit rough, and doesn't really work as expected (but I'd like confirmation that others see the issue too). In Linux, upon startup it finds an agent (I see
* Found SSH agent config
), but then it starts a new agent (I'm not sure how
/var/tmp/.ssh-agent
is getting created before
/etc/profile.d/ssh-agent.sh
runs). The proper way to test if the agent is alive is:
Copy code
ssh-add -l &>/dev/null
  if [[ $? -gt 1 ]]; then ...
Based on my experience with ssh-agent, I think a better implementation is here, which should work well in mac as well as linux worlds. With this setup, I can:
Copy code
ssh-add ~/.ssh/id_rsa
geodesic
(in geodesic shell)
ssh-add -L
and see my SSH keys from the host. Can somebody with a mac build with this
/etc/profile.d/ssh-agent.sh
and confirm that it works for Mac users as well?
y
Testing now
Works fine — I invoked the wrapper script with
GEODESIC_MAC_FORWARD_SOCKET=true
after building the container. Added and removed
ssh-agent
identities on the host and they appear and disappear within Geodesic.
m
You tested this using the stock
/etc/profile.d/ssh-agent.sh
that ships with geodesic?
y
I checked out your branch and rebuilt the container and installed the wrapper script using
make install
, then invoked
GEODESIC_MAC_FORWARD_SOCKET=true geodesic
My working tree when checking out your branch is entirely clean, I didn't change anything or add anything
m
If you use the stock geodesic (w/o my changes), can you see the host identities added/removed? ie. is the MacOS default ssh-agent fine and it's only Linux where the socket forwarding is the issue?
y
On the main branch I can perform the same test and it works fine — so I think if you're experiencing issues with SSH Agent forwarding / socket mounting it's only on Linux Hosts
m
Perfect -- after we settle on the fix for #594, I'll see if I can include this as well, or determine how to get it to work with Linux with minimal changes
👍 1