Merged detached head into master
This commit is contained in:
parent
bb1108b363
commit
2961e10cbd
1 changed files with 10 additions and 0 deletions
|
@ -35,6 +35,7 @@ usage(){
|
||||||
Just to be asked for password again, if you plugged off
|
Just to be asked for password again, if you plugged off
|
||||||
hardware-token and plugged it in again.
|
hardware-token and plugged it in again.
|
||||||
--rm|--remove remove keys and token instead of adding them.
|
--rm|--remove remove keys and token instead of adding them.
|
||||||
|
-R|--restart-agent
|
||||||
-h|--info Show this info
|
-h|--info Show this info
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +104,9 @@ set_and_load_identity_config() {
|
||||||
if [ -e "${ssh_identity_dir}/config" ]; then
|
if [ -e "${ssh_identity_dir}/config" ]; then
|
||||||
logdebug "source ${ssh_identity_dir}/config"
|
logdebug "source ${ssh_identity_dir}/config"
|
||||||
unset SSH_AUTH_SOCK SSH_AGENT_PID PKCS11_MODULE SSH_AGENT_ALLOW_FROM_REMOTE SSH_ADD_OPTION
|
unset SSH_AUTH_SOCK SSH_AGENT_PID PKCS11_MODULE SSH_AGENT_ALLOW_FROM_REMOTE SSH_ADD_OPTION
|
||||||
|
set -a
|
||||||
. "${ssh_identity_dir}/config"
|
. "${ssh_identity_dir}/config"
|
||||||
|
set +a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -116,6 +119,8 @@ start_or_restart_local_agent() {
|
||||||
logdebug "SSH_AUTH_SOCK: ${SSH_AUTH_SOCK:-not set}"
|
logdebug "SSH_AUTH_SOCK: ${SSH_AUTH_SOCK:-not set}"
|
||||||
logdebug "SSH_AGENT_PID: ${SSH_AGENT_PID:-not set}"
|
logdebug "SSH_AGENT_PID: ${SSH_AGENT_PID:-not set}"
|
||||||
logdebug "PKCS11_MODULE: ${PKCS11_MODULE:-not set}"
|
logdebug "PKCS11_MODULE: ${PKCS11_MODULE:-not set}"
|
||||||
|
# kill ssh-agent when wanted from options
|
||||||
|
${restartagent:-false} && ssh-agent -k
|
||||||
for i in $(pgrep -f ${SSH_AUTH_SOCK})
|
for i in $(pgrep -f ${SSH_AUTH_SOCK})
|
||||||
do
|
do
|
||||||
logdebug "$(stat ${SSH_AUTH_SOCK})"
|
logdebug "$(stat ${SSH_AUTH_SOCK})"
|
||||||
|
@ -348,6 +353,10 @@ keyonly=false
|
||||||
remove=false
|
remove=false
|
||||||
while :; do
|
while :; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
-r|--restart-agent)
|
||||||
|
restartagent=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-c|--create-only)
|
-c|--create-only)
|
||||||
createonly=true
|
createonly=true
|
||||||
shift
|
shift
|
||||||
|
@ -394,6 +403,7 @@ fi
|
||||||
logdebug " PKCS11_MODULE=${PKCS11_MODULE:-not set}"
|
logdebug " PKCS11_MODULE=${PKCS11_MODULE:-not set}"
|
||||||
|
|
||||||
logdebug " SSH_ADD_OPTIONS=${SSH_ADD_OPTIONS:-not set}"
|
logdebug " SSH_ADD_OPTIONS=${SSH_ADD_OPTIONS:-not set}"
|
||||||
|
logdebug " SSH_AGENT_OPTIONS=${SSH_AGENT_OPTIONS:-not set}"
|
||||||
logdebug "SSH_AGENT_ALLOW_FROM_REMOTE=${SSH_AGENT_ALLOW_FROM_REMOTE:-false}"
|
logdebug "SSH_AGENT_ALLOW_FROM_REMOTE=${SSH_AGENT_ALLOW_FROM_REMOTE:-false}"
|
||||||
logdebug " PKCS11_MODULE=${PKCS11_MODULE:-not set}"
|
logdebug " PKCS11_MODULE=${PKCS11_MODULE:-not set}"
|
||||||
logdebug " P11M=${P11M:-not set}"
|
logdebug " P11M=${P11M:-not set}"
|
||||||
|
|
Loading…
Reference in a new issue