|
2010-03-15
, 20:15
|
Posts: 3 |
Thanked: 4 times |
Joined on Mar 2010
|
#2
|
unset SSH_AUTH_SOCK unset SSH_AGENT_PID agentfile="/home/user/.ssh/agent" if [[ -f ${agentfile} ]]; then source ${agentfile} >> /dev/null fi ssh-add -l 2> /dev/null > /dev/null r=$? if [[ $r == 2 ]] then pkill ssh-agent ssh-agent -t 900 > ${agentfile} source ${agentfile}> /dev/null chmod 600 ${agentfile} fi unset agentfile alias idlist="ssh-add -l" alias idrsa="ssh-add /home/user/.ssh/id_rsa" alias idrsadel="ssh-add -d /home/user/.ssh/id_rsa"
The Following 2 Users Say Thank You to lnagel For This Useful Post: | ||
|
2010-03-15
, 21:24
|
Posts: 14 |
Thanked: 2 times |
Joined on Mar 2010
|
#3
|
The Following 2 Users Say Thank You to nyarlathotep For This Useful Post: | ||
|
2010-03-15
, 21:42
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#4
|
I'd suggest starting the ssh-agent before X because otherwise tasks spawned outside a shell don't have access.
#!/bin/sh eval `ssh-agent -s -t 900`
The Following 4 Users Say Thank You to Rob1n For This Useful Post: | ||
|
2010-07-14
, 13:27
|
Posts: 18 |
Thanked: 2 times |
Joined on Nov 2009
|
#5
|
|
2010-07-14
, 13:41
|
Posts: 18 |
Thanked: 2 times |
Joined on Nov 2009
|
#6
|
|
2012-11-11
, 13:18
|
Posts: 7 |
Thanked: 10 times |
Joined on Apr 2011
|
#7
|
eval `ssh-agent -s -t 7d`
The Following 2 Users Say Thank You to stuart34 For This Useful Post: | ||
http://insyte.squad51.net/archives/2...7T11_55_19.txt