load identity-config if exist

This commit is contained in:
Jakobus Schürz 2020-09-21 18:47:37 +02:00
parent 6fe65702e6
commit 1d8c319d00
2 changed files with 6 additions and 3 deletions

View file

@ -73,9 +73,10 @@ agent-load-identity-keys () {
if [ -n "${1+x}" ]; then
ssh_identity="$1"
identitydir=${SSH_IDENTITIES_DIR}/${ssh_identity}
[ -e "${identitydir}/.config" ] && . "${identitydir}/.config"
agentfile="${SSH_AGENTS_DIR}/agent-${ssh_identity}-$(hostname)"
agentsocket="${SSH_AGENT_SOCKETS_DIR}/socket-${ssh_identity}-$(hostname)"
identitydir=${SSH_IDENTITIES_DIR}/${ssh_identity}
echo "agentfile: $agentfile" >&2
echo "agentsocket: $agentsocket" >&2
echo ssh-identität: $ssh_identity >&2

View file

@ -688,12 +688,14 @@ token () {
case $1 in
-f)
FORCE=true
ssh_identity=$2
ssh_identity=${2-default}
;;
*)
ssh_identity=$1
ssh_identity=${1-default}
;;
esac
identitydir=${SSH_IDENTITIES_DIR}/${ssh_identity}
[ -e "${identitydir}/.config" ] && . "${identitydir}/.config"
local fingerprints
declare -a fingerprints
local tokenfingerprint