Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Mounting unix domain sockets does not work #648

Closed
cfstras opened this issue Feb 14, 2022 · 1 comment
Closed

Mounting unix domain sockets does not work #648

cfstras opened this issue Feb 14, 2022 · 1 comment

Comments

@cfstras
Copy link

cfstras commented Feb 14, 2022

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?

@AkihiroSuda
Copy link
Member

workaround: ssh -R

@lima-vm lima-vm locked and limited conversation to collaborators Feb 14, 2022
@AkihiroSuda AkihiroSuda converted this issue into discussion #649 Feb 14, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants