Hello all, On Fri, Jan 15, 2010 at 04:07:44PM +0000, Adam Hardy wrote: > I've been chasing my tail trying to work this one out following > different examples off the web, but can't sort it out and keep > getting the old > > "Could not open a connection to your authentication agent." > > from ssh-add, and nothing but inaction from keychain. > > I know everything has to run as a child of ssh-agent to gain access > to its envvars, but I don't how to achieve this. I used to have in $HOME/.bashrc: | AGENT_INFO_FILE=$HOME/.ssh/ssh-agent-info | if eval `cat "$AGENT_INFO_FILE"` 2> /dev/null && \ | kill -0 $SSH_AGENT_PID 2> /dev/null | then | eval `cut -d'=' -f 1 "$AGENT_INFO_FILE" | xargs echo export` | else | eval `ssh-agent -t 86400` > /dev/null | ( echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK"; | echo "SSH_AGENT_PID=$SSH_AGENT_PID" ) > "$AGENT_INFO_FILE" | fi While SSH_AUTH_SOCK is set no agent will be started during X startup as per /etc/X11/Xsession.d/90x11-common_ssh-agent and the previously started one will be used. This way the agent will be started only once per boot and one only needs to ssh-add once for all gettys. HTH, Flo
Attachment:
signature.asc
Description: Digital signature