File: ssh_agent

package info (click to toggle)
pox 0.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 392 kB
  • sloc: python: 1,354; makefile: 32; sh: 9
file content (24 lines) | stat: -rw-r--r-- 849 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# .ssh_agent
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 1997-2016 California Institute of Technology.
# Copyright (c) 2016-2025 The Uncertainty Quantification Foundation.
# License: 3-clause BSD.  The full license text is available at:
#  - https://github.com/uqfoundation/pox/blob/master/LICENSE

# --- ssh-agent ---
# If this shell is interactive, restart it within an ssh-agent.  This
# depends on ssh-agent and ssh-add being on the user's default PATH, which
# should be the case if they're in /usr/bin where they should be.

case $- in *i*)
  if [ "$SSH_AUTH_SOCK" == "" ] ; then
    exec ssh-agent $SHELL -l$- $*
  fi
  case "`ssh-add -l`" in "The agent has no identities."*)
    for i in identity id_rsa ; do if [ -r .ssh/$i ] ; then
      ssh-add .ssh/$i
    fi ; done
  esac
esac
# --- end ssh-agent ---