cagataygurturk / docker-ssh-tunnel

Simple SSH tunnel with Docker
151 stars 49 forks source link

".ssh/ssh_auth_sock" no such file or directory #8

Open kraftman opened 2 years ago

kraftman commented 2 years ago

Following the guide used to work ok, but recently I started getting an error about ssh_auth_sock not being found. Maybe its a recent ssh change, but it seems like ~/.ssh/ssh_auth_sock is now a symlink to a temp directory, which isn't resolved since its not mapped into the volume.

I don't know if it's the correct solution, but I was able to fix it by using the SSH_AUTH_SOCK variable to mount the temp file instead of the symlink, as follows:

    image: cagataygurturk/docker-ssh-tunnel
    volumes:
      - $HOME/.ssh:/root/ssh:ro
      - $SSH_AUTH_SOCK:/root/ssh/ssh_auth_sock