From 5027fbc82405aaa32e35c9ea86180639b112ec2d Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sun, 17 Jul 2022 13:25:39 +0200 Subject: [PATCH] Keychain eingebaut --- .bash_extra | 21 ++------------------- .ssh/config | 2 ++ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/.bash_extra b/.bash_extra index 4a17124..885897a 100644 --- a/.bash_extra +++ b/.bash_extra @@ -4,25 +4,8 @@ if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach -t default || tmux new -s default fi -### ssh-agent -# https://rabexc.org/posts/pitfalls-of-ssh-agents -SSH_ENV="$HOME/.ssh/environment" -function start_agent { - echo "Initialising new SSH agent..." - (umask 066; /usr/bin/ssh-agent > "${SSH_ENV}") - . "${SSH_ENV}" > /dev/null - /usr/bin/ssh-add; -} -# Source SSH settings, if applicable -if [ -f "${SSH_ENV}" ]; then - . "${SSH_ENV}" > /dev/null - ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { - start_agent; - } -else - start_agent; -fi - +### keychain +eval $(keychain -q --eval --timeout 60 --agents ssh) ### PS1 # git-symbole: * unstaged, + staged, $ stashed, % untracked diff --git a/.ssh/config b/.ssh/config index 430882d..1a67eca 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,4 +1,6 @@ ### ssh-agent +IgnoreUnknown UseKeychain +UseKeychain yes AddKeysToAgent yes ### grote.lan