Core Tunnel - ProxyCommand with other ssh connection


(Yang.Y) #21

I guess you are not using the ssh utilities shipped with macOS, the system default ssh-agent daemon should creates a unix socket locates at dir /private/tmp/ and suffixed with Listeners.

System default ssh-agent daemon is launched by launchd and always starts up before Core Tunnel, so the SSH_AUTH_SOCK var is always ready when Core Tunnel starts.

If your ssh-agent not managed by launchd, then the SSH_AUTH_SOCK var may not set correctly for GUI applications.


(Gerhard) #22

It seems like it. But I am not aware I did install another ssh-agent. But I di install gnupg. I will check the gpg-agent setup. Maybe that explains it.


(Gerhard) #23

I checked the configuration. It is not the gnupg agent which is running. It is very interesting that the wrong path is used/detected.

Can you explain how the path is detected?


(Yang.Y) #24

macOS shipped ssh-agent is launched by launchd utility, and by reading the rules in config file /System/Library/LaunchAgents/com.openssh.ssh-agent.plist, here is the content in my Mac:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.openssh.ssh-agent</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/bin/ssh-agent</string>
                <string>-l</string>
        </array>
        <key>Sockets</key>
        <dict>
                <key>Listeners</key>
                <dict>
                        <key>SecureSocketWithKey</key>
                        <string>SSH_AUTH_SOCK</string>
                </dict>
        </dict>
        <key>EnableTransactions</key>
        <true/>
</dict>
</plist>

According to the configuration, launchd will expose the SSH_AUTH_SOCK environment var on startup, so every GUI applications can read this var even it’s changed on each startup.


(Gerhard) #25

Hmmm, interesting. I will check my mac for that on the weekend. Thanks for that hint.