1
0
Fork 0

Try other ssh-add feature

This commit is contained in:
Malte Brandy 2020-12-17 03:01:03 +01:00
parent 3d0fa112aa
commit 26ec7d61f1
2 changed files with 3 additions and 8 deletions

View file

@ -152,14 +152,6 @@
maxCacheTtl = 31536000; # 1year
};
};
systemd.user.services.auto-ssh-add = {
Service = {
ExecStart = toString (pkgs.writeShellScript "auto-ssh-add"
"ssh-add < /dev/null"); # to trigger the usage of SSH_ASKPASS
Type = "oneshot";
};
Install.WantedBy = [ "default.target" ];
};
xdg.enable = true;
}

View file

@ -1,3 +1,6 @@
if [[ -z $(ssh-add -L) ]] {
DISPLAY="a" ssh-add < /dev/null
}
if [[ -n "$SSH_CONNECTION" && -z "$TMUX" ]] {
exec mytmux
}