Another attempt at thoroughly fixing tmux ssh agent.
This commit is contained in:
@@ -29,7 +29,9 @@
|
|||||||
|
|
||||||
file.".ssh/rc".text = ''
|
file.".ssh/rc".text = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
ln -sf "$SSH_AUTH_SOCK" "$HOME/.ssh/ssh_auth_sock"
|
if test "$SSH_AUTH_SOCK"; then
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" "$HOME/.ssh/ssh_auth_sock"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
file.".ssh/rc".executable = true;
|
file.".ssh/rc".executable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -398,7 +398,11 @@
|
|||||||
setw -g automatic-rename on
|
setw -g automatic-rename on
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
|
|
||||||
set-environment -g 'SSH_AUTH_SOCK' $HOME/.ssh/ssh_auth_sock
|
# first, unset update-environment[SSH_AUTH_SOCK] (idx 3), to prevent
|
||||||
|
# the client overriding the global value
|
||||||
|
set-option -g -u update-environment[3]
|
||||||
|
# And set the global value to our static symlink'd path:
|
||||||
|
set-environment -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user