Sponsored Content
Top Forums UNIX for Advanced & Expert Users Re: [docker/for-mac] Support for sharing UNIX sockets (#483) Post 303046290 by Neo on Thursday 30th of April 2020 12:15:30 AM
Old 04-30-2020
Re: [docker/for-mac] Support for sharing UNIX sockets (#483)

There now exists an official workaround for this as of Docker for Mac >= 2.2.0.0.

REF: File system sharing (osxfs) | Docker Documentation

The solution involves using a "magic path" specifically for SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock

Mount this special path into the container via docker run args:

Code:
SSH_AUTH_SOCK_MAGIC_PATH='/run/host-services/ssh-auth.sock'
docker run -ti -v ${SSH_AUTH_SOCK_MAGIC_PATH}:${SSH_AUTH_SOCK_MAGIC_PATH} \
           -e SSH_AUTH_SOCK=${SSH_AUTH_SOCK_MAGIC_PATH} \
           some-container/needing-ssh-agent

Note that this does not resolve the main issue of mounting arbitrary Unix sockets into a container. At least it works for ssh-agent / SSH_AUTH_SOCK!

So, this fix does not help when setting up a reverse web proxy to a Unix socket in the container (as mentioned above).


See also: Support for sharing unix sockets . Issue #483 . docker/for-mac . GitHub
 

6 More Discussions You Might Find Interesting

1. SCO

Sharing unix drives from two unix systems

I have two SCO openserver systems, 1 in the US and 1 in the UK. I am setting up a vpn to connect the two local networks that also have windows pc's on them. Is there a way that either unix system can see the hard drive on the other unix system so that I can share data between them. I run a cobol... (1 Reply)
Discussion started by: rongrout
1 Replies

2. IP Networking

sharing of IP address for load sharing avoiding virtual server & redirection machine

I have RedHat 9.0 installed on three of my servers (PIII - 233MHz) and want that they share a common IP address so that any request made reaches each of the servers. Can anyone suggest how should I setup my LAN. I'm new to networking in Linux so please elaborate and would be thankful for a timely... (2 Replies)
Discussion started by: Rakesh Ranjan
2 Replies

3. UNIX for Advanced & Expert Users

UNIX Message Queues vs. Sockets

If I use sockets for IPC, and can easily distribute my applications. UNIX Message Queues are local to the processor. As I understand it, Message Queues still incur system call overhead, just like socket calls. What advantage does a UNIX Message Queue provide versus a TCP or UDP Socket,... (2 Replies)
Discussion started by: zen29sky
2 Replies

4. UNIX for Advanced & Expert Users

UNIX domain sockets vs FIFOs

Is there a performance advantage of one of these over the other? Obviously, it makes no sense to use normal TCP sockets or UDP sockets w/ the overhead they carry. But what about UNIX domain sockets vs FIFOs? I'd think they'd be very similar, in terms of performance and in terms of how they're... (2 Replies)
Discussion started by: mgessner
2 Replies

5. UNIX for Dummies Questions & Answers

what is the advantage of unix sockets?

Hi, i understood that there are several type of sockets: TCP, UDP & Unix. i wondered, what is the performance advantages of unix socket of the other types? isn't it equal to use UDP with localhost as destination over unix socket? Thanks in advance, Sariel (1 Reply)
Discussion started by: sarielz
1 Replies

6. UNIX for Dummies Questions & Answers

Screen Sharing VNC Mac

Hello, I am having some trouble using screen sharing with my Mac. There is a Mac Pro in the lab at my school, and I need to access it via screen sharing from my Macbook Pro from home. Each has Lion. The screen sharing works when I am in the lab and the Mac Pro is on the WiFi network, it also works... (1 Reply)
Discussion started by: Tyler_92
1 Replies
ssh-agent(1)							   User Commands						      ssh-agent(1)

NAME
ssh-agent - authentication agent SYNOPSIS
ssh-agent [-a bind_address] [-c | -s ] [-d] [command [args]...] ssh-agent [-c | -s] -k DESCRIPTION
ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA). ssh-agent is often started at the beginning of a login session. All other windows or programs are started as clients to the ssh-agent program. Through use of environment variables, the agent can be located and automatically used for authentication when logging in to other machines using ssh(1). See the System Administra- tion Guide: Security Services. If a command line is given, this is executed as a subprocess of the agent. When the command dies, so does the agent. The agent initially does not have any private keys. Keys are added using ssh-add(1), which sends the identity to the agent. Several identi- ties can be stored in the agent; the agent can automatically use any of these identities. Use the -l option in ssh-add(1) to display the identities currently held by the agent. The agent is run in the user's local host. Authentication data need not be stored on any other machine, and authentication passphrases never go over the network. However, if the connection to the agent is forwarded over SSH remote logins, the user can use the privileges given by the identities anywhere in the network in a secure way. There are two main ways to get an agent setup. Either you let the agent start a new subcommand into which some environment variables are exported, or you let the agent print the needed shell commands (either sh(1) or csh(1) syntax can be generated) which can be evalled in the calling shell. Later, use ssh(1) to look at these variables and use them to establish a connection to the agent. A unix-domain socket is created (/tmp/ssh-XXXXXXXX/agent.pid) and the name of this socket is stored in the SSH_AUTH_SOCK environment vari- able. The socket is made accessible only to the current user. This method is easily abused by root or another instance of the same user. The SSH_AGENT_PID environment variable holds the agent's PID. The agent exits automatically when the command given on the command line terminates. OPTIONS
The following options are supported: -a bind_address Binds the agent to the unix-domain socket bind_address. The default is /tmp/ssh-XXXXXXXX/agent.pid. -c Generates C-shell commands on stdout. This is the default if SHELL indicates that it is a csh style of shell. -d Debug mode. When this option is specified, ssh-agent will not fork. -k Kills the current agent (given by the SSH_AGENT_PID environment variable). -s Generates Bourne shell commands on stdout. This is the default if SHELL does not indicate that it is a csh style of shell. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 An error occurred. FILES
/tmp/ssh-XXXXXXXX/agent.pid Unix-domain sockets used to contain the connection to the authentication agent. These sockets should only be readable by the owner. The sockets are removed when the agent exits. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), attributes(5) System Administration Guide: Security Services SunOS 5.11 17 Nov 2008 ssh-agent(1)
All times are GMT -4. The time now is 03:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy