1 #!/data/data/com.termux/files/usr/bin/sh
2 # source-ssh-agent: Script to source for ssh-agent to work.
4 # Check if accidentaly executed instead of sourced:
5 if echo "$0" |
grep -q source-ssh-agent
; then
6 echo "source-ssh-agent: Do not execute directly - source me instead!"
10 export SSH_AUTH_SOCK
=$PREFIX/tmp
/ssh-agent
14 ssh-agent
-a
$SSH_AUTH_SOCK > /dev
/null
18 MESSAGE
=`ssh-add -L 2>&1`
19 if [ "$MESSAGE" = 'Could not open a connection to your authentication agent.' -o \
20 "$MESSAGE" = 'Error connecting to agent: Connection refused' -o \
21 "$MESSAGE" = 'Error connecting to agent: No such file or directory' ]; then
23 elif [ "$MESSAGE" = "The agent has no identities." ]; then