7 [ -z "$hostopt" ] && hostopt="${HOSTNAME}"
8 [ -z "$hostopt" ] && hostopt=`uname -n 2>/dev/null || echo unknown`
9 keys=~/.ssh/id_rsa_root
13 unset SSH_AUTH_SOCK SSH_AGENT_PID
14 eval $(keychain --timeout $lifetime --eval --host "$hostopt-root" $keys)
21 unset SSH_AUTH_SOCK SSH_AGENT_PID
22 eval $(keychain --timeout $lifetime --eval --host "$hostopt-root")
24 echo with-agent: Running: "$@"
33 echo "Loading default keys (lifetime $lifetime)..."
34 with-agent ssh-add -t ${lifetime}m "$@" $keys
37 echo "Loading keys (lifetime $lifetime):" "$@"
38 with-agent ssh-add -t ${lifetime}m "$@"
47 with-keys "$SHELL" "$@"
50 #with-keys ssh -l root "$@"
54 if [ -z "$command" ]; then
55 echo "Usage: $0 init" >&2
58 echo " $0 destroy" >&2
60 echo " $0 ssh [args]" >&2
63 echo Executing: "$command" "$@"
64 with-agent "$command" "$@"