File tree Expand file tree Collapse file tree
.oh-my-shell/shellrc/plugins/ssh Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313SSH_AGENT_SETUP_SCRIPT=" /tmp/$USER .ssh_agent_setup.sh"
1414
1515cat << EOF >$SSH_AGENT_SETUP_SCRIPT
16+ #Debug script
17+ #set -x
18+ #exec >> /tmp/\$ USER.\$ PID.ssh.agent.setup.log
19+ #exec 2>&1
20+
1621 USER_SSH_AGENT_ENV="\$ 1"
1722 USER_SSH_AGENT_ENV_NAME="\$ (basename \$ 1)"
1823
@@ -51,6 +56,9 @@ cat <<EOF >$SSH_AGENT_SETUP_SCRIPT
5156 # Add new ssh-agent environment configuration
5257 echo 'export SSH_AUTH_SOCK'=\$ SSH_AUTH_SOCK >>"\$ USER_SSH_AGENT_ENV"
5358 echo 'export SSH_AGENT_PID'=\$ SSH_AGENT_PID >>"\$ USER_SSH_AGENT_ENV"
59+
60+ # Link ssh-agent socket to normalized paths
61+ ln -s -f "\$ SSH_AUTH_SOCK" "\$ HOME/.ssh/agent/env/\$ USER_SSH_AGENT_ENV_NAME.socket"
5462EOF
5563
5664# Create a single ssh-agent instance across all terminal sessions, for each predefined agent
You can’t perform that action at this time.
0 commit comments