Description
Description
Hi,
while I'm loving lima so far, here's a usecase that I haven't gotten to work yet:
I have an SSH agent (https://github.com/maxgoedjen/secretive) running which has a unix domain socket in ~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
.
F.ex., I can do this in a regular shell (not docker):
# SSH_AUTH_SOCK=$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh ssh [email protected]
Hi cfstras! You've successfully authenticated, but GitHub does not provide shell access.
Also, this works from my host:
# python3 -c 'import socket; sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM); sock.connect("socket.ssh")'
(no output)
Now, I want to use that socket from within my docker containers to securely pull git repositories.
However, when I try to use the socket from inside the lima VM:
# limactl shell docker -- bash -c "SSH_AUTH_SOCK=$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh ssh [email protected]"
[email protected]: Permission denied (publickey).
SSH seems to ignore the socket. If I try it manually from within limactl shell
, I see why:
# python3 -c 'import socket; sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM); sock.connect("socket.ssh")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ConnectionRefusedError: [Errno 111] Connection refused
I'm guessing this is because we are using sshfs, which does not seem to properly support Unix domain sockets? (Only found libfuse/sshfs#236)
Is there some recommended route I should go to use SSH within lima?